Skip to content

refactor(azure-open-ai): rename max_tokens to max_completion_tokens and remove deprecated parameters across multiple models - #2441

Merged
LordGameleo merged 1 commit into
mainfrom
fix-azure-openai-model-tokens
Aug 24, 2026
Merged

refactor(azure-open-ai): rename max_tokens to max_completion_tokens and remove deprecated parameters across multiple models#2441
LordGameleo merged 1 commit into
mainfrom
fix-azure-openai-model-tokens

Conversation

@LordGameleo

@LordGameleo LordGameleo commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator
  • Updated parameter names from max_tokens to max_completion_tokens for consistency.
  • Removed deprecated max_tokens parameter from various model YAML files.
  • Ensured all models reflect the latest naming conventions and parameter structures.

This change enhances clarity and aligns with the updated API specifications.


Note

Medium Risk
Model catalog changes that alter which token-limit parameter is sent to Azure OpenAI. Incorrect mapping could cause API errors or ignored output-length settings for many GPT-5 models.

Overview
Aligns Azure OpenAI GPT-5 family model configs with the Chat Completions API by exposing max_completion_tokens instead of max_tokens.

Across GPT-5 through GPT-5.6 YAML definitions, the request param key is renamed (or added where missing), and max_tokens is listed under removeParams so the deprecated field is stripped from requests. Limits still keep max_tokens as a catalog limit field.

Reviewed by Cursor Bugbot for commit fbcc844. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread providers/together-ai/salesforce/Llama-Rank-V1.yaml
Comment thread providers/wafer/deepseek-v4-pro.yaml

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 612af3e. Configure here.

Comment thread providers/wafer/deepseek-v4-pro.yaml Outdated
Comment thread providers/together-ai/salesforce/Llama-Rank-V1.yaml Outdated
Align gpt-5* model YAMLs with the completion-tokens API and reject deprecated max_tokens.

Co-authored-by: Cursor <cursoragent@cursor.com>
@LordGameleo
LordGameleo force-pushed the fix-azure-openai-model-tokens branch from 612af3e to fbcc844 Compare August 24, 2026 11:24
@LordGameleo
LordGameleo merged commit 85b3e3b into main Aug 24, 2026
8 checks passed
@LordGameleo
LordGameleo deleted the fix-azure-openai-model-tokens branch August 24, 2026 11:24
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