llama-stack-mirror/tests/unit/providers
Ashwin Bharambe d649c3663e
fix: enforce allowed_models during inference requests (#4197)
The `allowed_models` configuration was only being applied when listing
models via the `/v1/models` endpoint, but the actual inference requests
weren't checking this restriction. This meant users could directly
request any model the provider supports by specifying it in their
inference call, completely bypassing the intended cost controls.

The fix adds validation to all three inference methods (chat
completions, completions, and embeddings) that checks the requested
model against the allowed_models list before making the provider API
call.

### Test plan

Added unit tests
2025-11-19 14:49:44 -08:00
..
agents/meta_reference feat(responses)!: implement support for OpenAI compatible prompts in Responses API (#3965) 2025-11-19 11:48:11 -08:00
batches refactor(storage): make { kvstore, sqlstore } as llama stack "internal" APIs (#4181) 2025-11-18 13:15:16 -08:00
files refactor(storage): make { kvstore, sqlstore } as llama stack "internal" APIs (#4181) 2025-11-18 13:15:16 -08:00
inference feat!: standardize base_url for inference (#4177) 2025-11-19 08:44:28 -08:00
inline fix: rename llama_stack_api dir (#4155) 2025-11-13 15:04:36 -08:00
nvidia feat!: standardize base_url for inference (#4177) 2025-11-19 08:44:28 -08:00
utils fix: enforce allowed_models during inference requests (#4197) 2025-11-19 14:49:44 -08:00
vector_io fix: Pydantic validation error with list-type metadata in vector search (#3797) (#4173) 2025-11-19 10:16:34 -08:00
test_bedrock.py fix: rename llama_stack_api dir (#4155) 2025-11-13 15:04:36 -08:00
test_configs.py feat!: standardize base_url for inference (#4177) 2025-11-19 08:44:28 -08:00