Skip to content

fix(providers): serve api.airforce live /models catalog instead of stale seed - #4395

Merged
diegosouzapw merged 1 commit into
release/v3.8.32from
fix/escalated-api-airforce-live-discovery
Jun 20, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.32from
fix/escalated-api-airforce-live-discovery

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

Causa

api-airforce tem um catálogo vivo real em https://api.airforce/v1/models, mas ficou fora de NAMED_OPENAI_STYLE_PROVIDERS em src/app/api/providers/[id]/models/route.ts (mesmo após o provider-sweep #4324, que tocou o arquivo mas não o incluiu). Por isso a rota de import servia o seed hardcoded stale (grok-3, grok-2-1212, claude-3.7-sonnet …) — modelos que não existem mais no upstream. Resultado: a conexão testa válida (bate no baseUrl) mas o chat falha (modelo inexistente).

Fix

Adiciona "api-airforce" ao NAMED_OPENAI_STYLE_PROVIDERS — mesmo padrão de #4249 (vercel-ai-gateway), #4202 (zenmux), #3976 (llm7/byteplus) e das 19 entradas do sweep. A rota passa a fazer fetch vivo de <baseUrl>/models; o seed do registry permanece como fallback offline (verificado em route.ts:1265-1294: falha de fetch → local_catalog), então o import nunca quebra se o upstream estiver indisponível.

TDD

Estende tests/unit/provider-sweep-live-discovery.test.ts com o caso api-airforce.

  • RED provado: o caso falhava com "should have probed https://api.airforce/v1/models" (a rota não probeava o upstream → servia local_catalog).
  • GREEN: sweep test 21/21 · siblings (zenmux/vercel/llm7/openai-style) 25/25 · typecheck 0 · lint 0 · provider-consistency OK · docs-sync PASS · any-budget PASS.

file-size

route.ts é um god-file frozen (2586→2590). Adicionar uma entrada a um Set curado não é extraível → rebaseline com justificativa no padrão _rebaseline_* (igual ao sweep). Shrink estrutural rastreado em #3789.

Relacionada

Issue OPEN #3550 (auto-switch quando "model does not exist in api.airforce") — ângulo distinto (error-handling), mesmo sintoma.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds api-airforce to the NAMED_OPENAI_STYLE_PROVIDERS set in src/app/api/providers/[id]/models/route.ts to enable live model discovery and prevent issues with stale hardcoded seeds. It also adds a corresponding test case to tests/unit/provider-sweep-live-discovery.test.ts and updates the file size baseline in config/quality/file-size-baseline.json. There are no review comments, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@diegosouzapw
diegosouzapw changed the base branch from release/v3.8.30 to release/v3.8.31 June 20, 2026 14:58
@diegosouzapw
diegosouzapw force-pushed the fix/escalated-api-airforce-live-discovery branch from c667f74 to 908d4d5 Compare June 20, 2026 14:58
@diegosouzapw
diegosouzapw changed the base branch from release/v3.8.31 to release/v3.8.32 June 20, 2026 18:31
…ale seed

api-airforce carries a real live https://api.airforce/v1/models catalog but was
left out of NAMED_OPENAI_STYLE_PROVIDERS, so the import route served its small
hardcoded seed (grok-3, grok-2-1212, claude-3.7-sonnet …) — models that no
longer exist upstream, so chat failed even though the connection test passed.

Add api-airforce to NAMED_OPENAI_STYLE_PROVIDERS (same shape as #4249/#4202/#3976
and the provider-model-sweep rows) so import does a live <baseUrl>/models fetch.
The registry seed stays as the offline fallback, so import never breaks if the
upstream is unreachable.

TDD: extends tests/unit/provider-sweep-live-discovery.test.ts (red proven: the
api-airforce case did not probe upstream and served local_catalog).
@diegosouzapw
diegosouzapw force-pushed the fix/escalated-api-airforce-live-discovery branch from 908d4d5 to af820df Compare June 20, 2026 20:04
@diegosouzapw
diegosouzapw merged commit 23f3863 into release/v3.8.32 Jun 20, 2026
3 checks passed
oyi77 added a commit to oyi77/OmniRoute that referenced this pull request Jun 20, 2026
…iegosouzapw#3594)

Includes api-airforce live catalog fix (diegosouzapw#4395) ported to extracted helpers.
@diegosouzapw diegosouzapw mentioned this pull request Jun 21, 2026
@diegosouzapw
diegosouzapw deleted the fix/escalated-api-airforce-live-discovery branch June 21, 2026 12:33
oyi77 added a commit to oyi77/OmniRoute that referenced this pull request Jun 22, 2026
…iegosouzapw#3594)

Includes api-airforce live catalog fix (diegosouzapw#4395) ported to extracted helpers.
oyi77 added a commit to oyi77/OmniRoute that referenced this pull request Jun 22, 2026
…iegosouzapw#3594)

Includes api-airforce live catalog fix (diegosouzapw#4395) ported to extracted helpers.
tkgo11 pushed a commit to tkgo11/OmniRoute that referenced this pull request Sep 23, 2026
…ale seed (diegosouzapw#4395)

api-airforce carries a real live https://api.airforce/v1/models catalog but was
left out of NAMED_OPENAI_STYLE_PROVIDERS, so the import route served its small
hardcoded seed (grok-3, grok-2-1212, claude-3.7-sonnet …) — models that no
longer exist upstream, so chat failed even though the connection test passed.

Add api-airforce to NAMED_OPENAI_STYLE_PROVIDERS (same shape as diegosouzapw#4249/diegosouzapw#4202/diegosouzapw#3976
and the provider-model-sweep rows) so import does a live <baseUrl>/models fetch.
The registry seed stays as the offline fallback, so import never breaks if the
upstream is unreachable.

TDD: extends tests/unit/provider-sweep-live-discovery.test.ts (red proven: the
api-airforce case did not probe upstream and served local_catalog).
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