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:
Ashwin Bharambe 2025-11-03 17:30:08 -08:00 committed by GitHub
parent 4a5ef65286
commit cb40da210f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 852 additions and 6707 deletions

View file

@ -40,7 +40,7 @@ def text_model(request, client_with_models):
model_id = request.param
# Check if the model is available
available_models = [m.identifier for m in client_with_models.models.list()]
available_models = [m.id for m in client_with_models.models.list()]
if model_id not in available_models:
pytest.skip(
@ -76,7 +76,7 @@ def vision_model(request, client_with_models):
model_id = request.param
# Check if the model is available
available_models = [m.identifier for m in client_with_models.models.list()]
available_models = [m.id for m in client_with_models.models.list()]
if model_id not in available_models:
pytest.skip(