Skip to content
TheChatArchiveThe Chat Archive
gpt-5.6-sol· openaiHugging Face ibragim-bad/swe_rebench_07_2026_trajectories

/v1/models: return the full catalog with per-model availability + opt-in filter Split…

  1. User

    /v1/models: return the full catalog with per-model availability + opt-in filter Split out from #242.

    Current: `GET /v1/models` returns only models that are connected right now (enabled AND an enabled key can serve them).

    Wanted: by default return the whole catalog (one entry per model id), each annotated with whether it's usable, plus an opt-in filter to get just the connected ones.

    Per-model annotation:

    • `available`: boolean — enabled AND a matching enabled key exists.
    • `unavailable_reason`: `null` | `"no_key"` (enabled, no key) | `"disabled"` (catalog row disabled).

    Filter:

    • `?available=true` (alias `?connected=true`) → only connected models (the previous default behavior).

    Notes:

    • The extra fields are additive — OpenAI-compatible clients ignore unknown fields.
    • Dedup prefers an available instance of a model id over a disabled/keyless one.
    • The `auto` virtual model is always `available: true`.

    Interface

    No new interfaces are introduced.

  2. Assistant

    I’ll trace the models endpoint and its tests, then update the catalog/dedup/filter behavior and run the focused suite.

  3. Assistant

    rg isn’t installed here, so I’m switching to the repository’s available search tools and narrowing the scan to source/test files.

  4. Assistant

    The endpoint currently filters in SQL before deduplication. I found the key detail for the fix: availability must be computed per catalog row first, then deduplication must rank available rows ahead of every unavailable duplicate. I’m updating that ordering and applying the query filter only after deduplication.

  5. Assistant

    The first focused-test command used a workspace-relative path incorrectly, so Vitest found no file. I’ve corrected the path; no test result has been evaluated yet.

  6. Assistant

    The focused behavior now passes. I’ve added a regression case where a much lower-ranked disabled duplicate competes with an available row, ensuring availability truly wins deduplication. I’m running that suite again alongside the TypeScript build.

  7. Assistant

    The endpoint regression suite and build are green. The full server suite is still running; I’m waiting on it now to catch cross-route assumptions about the old default.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.