-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Add native tool calling support to OpenAI-compatible #9369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
Contributor
Re-review completed. All previously flagged issues have been resolved.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
daniel-lxs
approved these changes
Nov 18, 2025
…to BaseProvider - Add convertToolsForOpenAI() and convertToolSchemaForOpenAI() methods to BaseProvider - These methods ensure all properties are in required array and convert nullable types - Remove line_ranges from required array in read_file tool (converter handles it) - Update OpenAiHandler and BaseOpenAiCompatibleProvider to use helper methods - Eliminates code duplication across multiple tool usage sites - Fixes: OpenAI completion error: 400 Invalid schema for function 'read_file'
daniel-lxs
approved these changes
Nov 18, 2025
Contributor
|
@mrubens Could you please explain where the option should appear in the model settings? Should this setting appear in any model, or is there some preliminary filtering occurring? |
mini2s
added a commit
to zgsm-ai/costrict
that referenced
this pull request
Nov 19, 2025
Important
Adds native tool calling support to OpenAI-compatible models, handling tool calls in both streaming and non-streaming modes, with updated tests and tool schema.
supportsNativeTools: truetoopenAiModelInfoSaneDefaultsinopenai.ts.createMessage()inopenai.tsfor both streaming and non-streaming modes.handleO3FamilyMessage()andhandleStreamResponse()inopenai.ts.openai.spec.ts.openai.spec.ts.read_filetool schema to requireline_rangesinread_file.ts.This description was created by
for 501a7cc. You can customize this summary. It will automatically update as commits are pushed.