feat(core): add GPT-5 model support with Responses API for 1.0 branch#1402
Closed
feat(core): add GPT-5 model support with Responses API for 1.0 branch#1402
Conversation
- Automatically detect GPT-5 models by name - Use max_completion_tokens instead of max_tokens for GPT-5 - Handle GPT-5's temperature restrictions (only supports default) - Parse GPT-5 Responses API response format - Add tests for GPT-5 functionality - Update documentation with GPT-5 configuration Fixes #1060 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR integrates GPT-5 model support from PR #1193 (by @kidandcat) into the 1.0 branch. The implementation automatically detects GPT-5 models and uses the OpenAI Responses API with appropriate parameters.
Changes
Core Implementation
max_completion_tokensinstead ofmax_tokensfor GPT-5 modelsFiles Modified
packages/core/src/ai-model/service-caller/index.ts: Integrated GPT-5 logic into 1.0's codebase structureapps/site/docs/en/model-provider.mdx: Added GPT-5 documentation while preserving 1.0's environment variable naming conventionspackages/core/tests/unit-test/service-caller.test.ts: Merged GPT-5 tests with existing 1.0 test suiteConflict Resolution
The original PR was based on the main branch. This PR adapts all changes to work with the 1.0 branch's structure, which includes:
Credit
Original implementation by @kidandcat in PR #1193. The commit history preserves the original author's credit.
Testing
Usage Example
The system automatically detects GPT-5 models and uses the Responses API with
max_completion_tokens.Closes #1060 (for 1.0 branch)
Related to #1193