Skip to content

fix(sync): stop re-adding shut-down and unlisted provider routes - #1910

Merged
Abhijeet Prasad (AbhiPrasad) merged 1 commit into
mainfrom
devin/1795625414-sync-skip-shutdown-providers
Nov 25, 2026
Merged

Abhijeet Prasad (AbhiPrasad) merged 1 commit into
mainfrom
devin/1795625414-sync-skip-shutdown-providers

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

The daily Sync new models run (#1909) kept re-introducing catalog data that the lifecycle audit had already corrected. This PR fixes three causes in sync_models.ts:

  • Shut-down OpenAI routes. LiteLLM still lists models OpenAI has shut down (GPT-5.x Codex, GPT-4.1 nano, gpt-4o-2024-05-13, GPT-3.5 legacy), so the --provider openai merge added openai back. resolveRemoteModels now skips entries whose LiteLLM deprecation_date (a shutdown date) is on or before today. LITELLM_MISSING_SHUTDOWN_DATES covers 3 undated aliases (gpt-4o-search-preview, gpt-4o-mini-search-preview, gpt-3.5-turbo-instruct-0914) whose snapshots are on OpenAI's deprecations page.
  • Azure assumed for every OpenAI model. getProviderMappingForModel maps openai to ["openai", "azure"], which is how the four *-healthcare models got azure. resolveRemoteModels now keeps azure only when LiteLLM lists a live azure/<model> or azure/<region>/<model> entry.
  • TTS pricing. For mode: "audio_speech", LiteLLM's output_cost_per_token is a text rate. The sync now prefers output_cost_per_audio_token, so gpt-4o-mini-tts stays at OpenAI's $12/M instead of being reset to $10/M.

resolveRemoteModels takes an injectable today for tests. The find-missing path now calls resolveRemoteModels(remoteModels, argv.provider) instead of pre-filtering; that filter is the same and gives the Azure lookup the full list.

Verification: I ran update-models and add-models --provider openai --write on main with this change. The only diffs were the legitimate healthcare pricing and limits and chat-latest max_input_tokens that #1909 also adds. There were no openai or azure route additions and no TTS price change.

Link to Devin session: https://braintrust.devinenterprise.com/sessions/6816bbfb54e1454d9a20a7ff97c00143
Open in Devin Desktop: https://braintrust.devinenterprise.com/desktop/session/6816bbfb54e1454d9a20a7ff97c00143?variant=devin

> 🤖 **This text was AI-generated.**

- Skip LiteLLM entries past their shutdown date (`deprecation_date`) so they no longer re-add `openai` to models OpenAI has shut down. A small map covers undated aliases whose snapshots are shut down.
- Add `azure` for an OpenAI model only when LiteLLM lists a live `azure/...` deployment, instead of for every OpenAI model.
- Use `output_cost_per_audio_token` for `audio_speech` models so the sync stops resetting `gpt-4o-mini-tts` output to the text rate.

Co-authored-by: Abhijeet Prasad <abhijeet@braintrustdata.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access that start with 'Devin'.

  • Disable automatic comment, CI, and merge conflict monitoring

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e0caf664c4

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "Codex (@codex) address that feedback".

}

const resolvedRemote = resolveRemoteModels(filteredRemoteModels);
const resolvedRemote = resolveRemoteModels(remoteModels, argv.provider);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Exclude shut-down entries from summary totals

When find-missing --summarize runs after a provider has shut down a model, resolveRemoteModels now excludes that entry, but filteredRemoteModels still includes it and supplies totalRemote for the summary. If every live model is present locally while the shut-down model is absent, the command consequently reports that all remote models are present and prints an inflated total. Build the summary totals from the same shutdown-filtered set used by resolveRemoteModels.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T16:56:08.808581Z e0caf66 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@AbhiPrasad
Abhijeet Prasad (AbhiPrasad) merged commit 973d69b into main Nov 25, 2026
6 checks passed
Abhijeet Prasad (AbhiPrasad) added a commit that referenced this pull request Nov 25, 2026
…turbo-instruct (#1911)

## Summary

`gpt-3.5-turbo-instruct` still routed to providers that no longer serve
it.

| Provider | Status | Source | Change |
|---|---|---|---|
| `openai` | Shut down 2026-09-28 | [OpenAI
deprecations](https://developers.openai.com/api/docs/deprecations) |
removed |
| `openrouter` | Not in `/api/v1/models`, 0 endpoints at
`/models/openai/gpt-3.5-turbo-instruct/endpoints` | [OpenRouter models
API](https://openrouter.ai/api/v1/models) | removed |
| `azure` | `gpt-35-turbo-instruct` not on the [Azure retirement
schedule](https://learn.microsoft.com/en-us/azure/foundry/openai/concepts/model-retirements);
still the listed replacement on the [retired models
page](https://learn.microsoft.com/en-us/azure/foundry/openai/concepts/legacy-models)
| kept |

```diff
- "gpt-3.5-turbo-instruct": ["openai", "azure", "openrouter"],
+ "gpt-3.5-turbo-instruct": ["azure"],
```

`retirement_date: 2026-09-28` is removed: by catalog convention it is
the last shutdown across all `available_providers`, and Azure has no
announced date. This matches `gpt-3.5-turbo-instruct-0914` (Azure-only,
no `retirement_date`) from #1886. `deprecated: true` and
`deprecation_date` (notice date 2025-09-26) are unchanged.

The sync fix in #1910 already treats LiteLLM's `2026-09-28` shutdown
date as past, so the sync will not re-add `openai`.

Link to Devin session:
https://braintrust.devinenterprise.com/sessions/6816bbfb54e1454d9a20a7ff97c00143
Open in Devin Desktop:
https://braintrust.devinenterprise.com/desktop/session/6816bbfb54e1454d9a20a7ff97c00143?variant=devin

Co-authored-by: Abhijeet Prasad <abhijeet@braintrustdata.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.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