Skip to content

fix: remove unstable stability flag for Azure models#1920

Open
steebchen wants to merge 1 commit intomainfrom
feat/azure
Open

fix: remove unstable stability flag for Azure models#1920
steebchen wants to merge 1 commit intomainfrom
feat/azure

Conversation

@steebchen
Copy link
Copy Markdown
Member

@steebchen steebchen commented Mar 29, 2026

Summary by CodeRabbit

  • Chores
    • Updated Azure provider configuration for GPT-5, GPT-5 Mini, and GPT-5 Nano models with pricing adjustments.

Copilot AI review requested due to automatic review settings March 29, 2026 07:34
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 29, 2026

Walkthrough

Updates Azure provider entries for GPT-5 model variants (gpt-5, gpt-5-mini, gpt-5-nano) by removing the stability: "unstable" property and adding discount: 0.3. No other pricing fields, context sizes, or capabilities were modified.

Changes

Cohort / File(s) Summary
Azure GPT-5 Provider Metadata
packages/models/src/models/openai.ts
Removed stability: "unstable" and added discount: 0.3 to Azure provider entries for three GPT-5 model variants (gpt-5, gpt-5-mini, gpt-5-nano).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • PR #1367: Adds Azure provider mappings and marks GPT-5 variants as unstable, establishing the baseline entries modified in this PR.
  • PR #1183: Directly adjusts the same Azure GPT-5 entries, adding stability flags that this PR then removes with discount configuration.
  • PR #1538: Removes stability: "unstable" from specific model provider entries, following the same metadata cleanup pattern.

Suggested reviewers

  • smakosh
  • kmk142789
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing the unstable stability flag from Azure model entries (gpt-5, gpt-5-mini, gpt-5-nano) and replacing it with a discount field.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/azure

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 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

📥 Commits

Reviewing files that changed from the base of the PR and between 4e6335d and cbdefcc.

📒 Files selected for processing (1)
  • packages/models/src/models/openai.ts

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 for gpt-5, gpt-5-mini, and gpt-5-nano.
  • Added discount: 0.3 to those same Azure mappings (affecting effective price calculations).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 774 to 780
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,
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
Comment on lines 840 to 847
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,
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
Comment on lines +779 to 780
discount: 0.3,
cachedInputPrice: 0.125 / 1e6,
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
discount: 0.3,
cachedInputPrice: 0.125 / 1e6,
cachedInputPrice: 0.125 / 1e6,
discount: 0.3,

Copilot uses AI. Check for mistakes.
Comment on lines +909 to 912
discount: 0.3,
inputPrice: 0.05 / 1e6,
outputPrice: 0.4 / 1e6,
cachedInputPrice: 0.005 / 1e6,
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
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,

Copilot uses AI. Check for mistakes.
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.

2 participants