Skip to content

fix: return flat JSON list from /v1/models endpoint#180

Open
jcabrero wants to merge 1 commit intofeat/rust-migrationfrom
worktree-agent-a66f2fad
Open

fix: return flat JSON list from /v1/models endpoint#180
jcabrero wants to merge 1 commit intofeat/rust-migrationfrom
worktree-agent-a66f2fad

Conversation

@jcabrero
Copy link
Member

Summary

  • Changed /v1/models endpoint to return a flat JSON array of model objects instead of an OpenAI-style {"object": "list", "data": [...]} wrapper.
  • The e2e test (test_models_endpoint) asserts isinstance(response.json(), list) and reads model.get("id") directly from items, so the response must be a plain list.
  • ModelMetadata already has an id field, so no domain changes were needed.

Test plan

  • cargo check --workspace passes
  • cargo test --workspace passes (3/3 tests)
  • e2e tests (requires Docker services — to be verified in CI)

🤖 Generated with Claude Code

The e2e test expects a plain JSON array of model objects, not an
OpenAI-style wrapper with "object" and "data" keys.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant