Update OpenAPI specification to use gpt-5 model and replace max_token…#131
Conversation
…s with max_completion_tokens in examples and descriptions.
There was a problem hiding this comment.
Pull request overview
Updates the Portkey OpenAPI specification to reflect newer OpenAI/Portkey chat completion conventions, including GPT‑5 model examples and the shift from max_tokens to max_completion_tokens.
Changes:
- Updated
/chat/completionscode samples to usemodel: gpt-5and includemax_completion_tokens. - Deprecated
max_tokensinCreateChatCompletionRequestand introducedmax_completion_tokenswith updated descriptions. - Extended
CompletionUsagewith optional token breakdown fields (completion_tokens_details,prompt_tokens_details).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }, | ||
| "max_tokens": 250, | ||
| "max_completion_tokens": 250, | ||
| "presence_penalty": 0.2 | ||
| }' |
There was a problem hiding this comment.
The /prompts/{promptId}/completions request schema description above still references max_tokens in its hyperparameters note, but the examples here were updated to use max_completion_tokens. Please update that note to mention max_completion_tokens (and/or note max_tokens is deprecated) to keep the documentation consistent.
| "user_input": "Hello world" | ||
| }, | ||
| "max_tokens": 250, | ||
| "max_completion_tokens": 250, | ||
| "presence_penalty": 0.2 | ||
| }' |
There was a problem hiding this comment.
The /prompts/{promptId}/render request schema description above still references max_tokens in its hyperparameters note, but the examples here were updated to use max_completion_tokens. Please update that note to mention max_completion_tokens (and/or note max_tokens is deprecated) to keep the documentation consistent.
…completion_tokens in descriptions.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Update OpenAPI specification to use gpt-5 model and replace max_tokens with max_completion_tokens in examples and descriptions.