fix: update tests for OpenAI-style models endpoint

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.
This commit is contained in:
Ashwin Bharambe 2025-11-03 16:16:16 -08:00
parent 4a5ef65286
commit 809dae01c2
24 changed files with 823 additions and 6697 deletions

View file

@ -56,7 +56,7 @@ def test_unregistered_model_routing_with_provider_data(client_with_models):
test_model_id = "anthropic/claude-3-5-sonnet-20241022"
# First, verify the model is NOT registered
registered_models = {m.identifier for m in client.models.list()}
registered_models = {m.id for m in client.models.list()}
assert test_model_id not in registered_models, f"Model {test_model_id} should not be pre-registered for this test"
# Check if anthropic provider is available in ci-tests