fix: remove unstable stability flag for Azure models#1920
fix: remove unstable stability flag for Azure models#1920
Conversation
WalkthroughUpdates Azure provider entries for GPT-5 model variants ( Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/models/src/models/openai.ts (1)
839-866: Verify if other Azure models should also have stability flag removed.The changes to gpt-5, gpt-5-mini, and gpt-5-nano look correct and consistent. However, several other Azure model providers still retain
stability: "unstable", including:
- Codex variants: gpt-5.1-codex, gpt-5.1-codex-mini, gpt-5.2-codex, gpt-5.3-codex
- Chat variants: gpt-5.2-chat-latest, gpt-5.3-chat-latest
- gpt-5.2-pro
If these models should also be marked as stable on Azure, they could be updated in a follow-up. If this scoping is intentional (e.g., only base variants are stable), no action needed.
Also applies to: 905-932
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/models/src/models/openai.ts` around lines 839 - 866, The PR removed the stability flag for azure base gpt-5 variants but left several Azure model entries still marked stability: "unstable"; review the Azure model objects for gpt-5.1-codex, gpt-5.1-codex-mini, gpt-5.2-codex, gpt-5.3-codex, gpt-5.2-chat-latest, gpt-5.3-chat-latest, and gpt-5.2-pro in packages/models/src/models/openai.ts and either remove the stability: "unstable" property or change it to the intended value (e.g., delete the key to make them stable) so the Azure entries are consistent with the gpt-5, gpt-5-mini, and gpt-5-nano updates.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@packages/models/src/models/openai.ts`:
- Around line 839-866: The PR removed the stability flag for azure base gpt-5
variants but left several Azure model entries still marked stability:
"unstable"; review the Azure model objects for gpt-5.1-codex,
gpt-5.1-codex-mini, gpt-5.2-codex, gpt-5.3-codex, gpt-5.2-chat-latest,
gpt-5.3-chat-latest, and gpt-5.2-pro in packages/models/src/models/openai.ts and
either remove the stability: "unstable" property or change it to the intended
value (e.g., delete the key to make them stable) so the Azure entries are
consistent with the gpt-5, gpt-5-mini, and gpt-5-nano updates.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 7321898c-22f0-49db-98cd-1a9f21c4ea03
📒 Files selected for processing (1)
packages/models/src/models/openai.ts
There was a problem hiding this comment.
Pull request overview
Removes the stability: "unstable" flag from select Azure OpenAI model mappings so they’re no longer treated as unstable by downstream model-selection/filtering logic.
Changes:
- Removed provider-level
stability: "unstable"from Azure mappings forgpt-5,gpt-5-mini, andgpt-5-nano. - Added
discount: 0.3to those same Azure mappings (affecting effective price calculations).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| test: "skip", | ||
| providerId: "azure", | ||
| stability: "unstable" as const, | ||
| modelName: "gpt-5", | ||
| inputPrice: 1.25 / 1e6, | ||
| outputPrice: 10.0 / 1e6, | ||
| discount: 0.3, | ||
| cachedInputPrice: 0.125 / 1e6, |
There was a problem hiding this comment.
PR title indicates removing the unstable stability flag for Azure mappings, but this change only removes it for the GPT-5 / GPT-5-mini / GPT-5-nano Azure entries. There are still multiple Azure mappings in this file that set stability: "unstable" (e.g. around openai.ts:1138, 1249, 1297, 1566, 1615, 1664). If the intent is to stop treating Azure as unstable, please remove/update those remaining flags as well (or adjust the PR title/scope to match).
| test: "skip", | ||
| providerId: "azure", | ||
| stability: "unstable" as const, | ||
| modelName: "gpt-5-mini", | ||
| inputPrice: 0.25 / 1e6, | ||
| outputPrice: 2 / 1e6, | ||
| cachedInputPrice: 0.025 / 1e6, | ||
| discount: 0.3, | ||
| requestPrice: 0, |
There was a problem hiding this comment.
This hunk introduces discount: 0.3 for the Azure mappings while also removing stability. That changes effective pricing used by provider/model selection (discount affects cheapest-provider logic), which is a behavior change beyond "remove unstable stability flag". If Azure pricing should remain identical to OpenAI, drop the discount; otherwise please document/justify the Azure discount (and consider applying it consistently across all Azure mappings for this family).
| discount: 0.3, | ||
| cachedInputPrice: 0.125 / 1e6, |
There was a problem hiding this comment.
discount is placed inconsistently relative to the other pricing fields in the Azure GPT-5 mappings (e.g. here it appears before cachedInputPrice, while elsewhere in this file discounts typically come after cachedInputPrice). Please reorder fields consistently (keep pricing-related fields grouped in the same order) to reduce maintenance mistakes when updating prices later.
| discount: 0.3, | |
| cachedInputPrice: 0.125 / 1e6, | |
| cachedInputPrice: 0.125 / 1e6, | |
| discount: 0.3, |
| discount: 0.3, | ||
| inputPrice: 0.05 / 1e6, | ||
| outputPrice: 0.4 / 1e6, | ||
| cachedInputPrice: 0.005 / 1e6, |
There was a problem hiding this comment.
In this Azure mapping, discount is inserted before inputPrice (unlike other entries where discount is grouped with the pricing fields, typically after cachedInputPrice). Please keep a consistent field ordering for pricing attributes to avoid overlooking discount when updating token prices.
| discount: 0.3, | |
| inputPrice: 0.05 / 1e6, | |
| outputPrice: 0.4 / 1e6, | |
| cachedInputPrice: 0.005 / 1e6, | |
| inputPrice: 0.05 / 1e6, | |
| outputPrice: 0.4 / 1e6, | |
| cachedInputPrice: 0.005 / 1e6, | |
| discount: 0.3, |
Summary by CodeRabbit