mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 09:53:45 +00:00
fix: update tests for OpenAI-style models endpoint (#4053)
The llama-stack-client now uses /`v1/openai/v1/models` which returns OpenAI-compatible model objects with 'id' and 'custom_metadata' fields instead of the Resource-style 'identifier' field. Updated api_recorder to handle the new endpoint and modified tests to access model metadata appropriately. Deleted stale model recordings for re-recording. **NOTE: CI will be red on this one since it is dependent on https://github.com/llamastack/llama-stack-client-python/pull/291/files landing. I verified locally that it is green.**
This commit is contained in:
parent
4a5ef65286
commit
cb40da210f
27 changed files with 852 additions and 6707 deletions
|
|
@ -160,7 +160,7 @@ def client_with_models(
|
|||
providers = [p for p in client.providers.list() if p.api == "inference"]
|
||||
assert len(providers) > 0, "No inference providers found"
|
||||
|
||||
model_ids = {m.identifier for m in client.models.list()}
|
||||
model_ids = {m.id for m in client.models.list()}
|
||||
|
||||
if text_model_id and text_model_id not in model_ids:
|
||||
raise ValueError(f"text_model_id {text_model_id} not found")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue