Allow passing additional model parameters in OpenAI tool usage
#541 opened on Jan 26, 2026
Repository metrics
- Stars
- (29,947 stars)
- PR merge metrics
- (PR metrics pending)
Description
Feature Description
Currently, it's not possible to pass additional OpenAI model parameters such as service_tier when using tools that wrap OpenAI chat completion endpoints. Tools only allow passing model and messages, but omit advanced OpenAI options like service_tier, temperature, top_p, etc. This limitation restricts users from leveraging advanced model capabilities and newer OpenAI features.
Problem Statement
Users are unable to specify options like service_tier='flex' or other advanced OpenAI model parameters when using the tool interfaces (e.g., image generation, conversation tools), making it harder to experiment with or benefit from new OpenAI features unless they bypass the built-in tool integration.
Proposed Solution
Enhance the internal OpenAIChatCompletionParams interface (and associated tool logic) to accept arbitrary additional OpenAI API parameters via a 'pass-through' or 'extends' approach (e.g., [key: string]: unknown). Document which parameters are explicitly supported, and ensure these extra fields are forwarded to the OpenAI SDK request when the tool is acting as a proxy. This will allow users to specify fields like service_tier, temperature, top_p, etc, when invoking tools—not just when using the OpenAI client directly.
Feature Category
UI/UX Improvement
Additional Context
Related code: OpenAI2GeminiConverter.ts, OpenAIRotatingClient.ts, and tool implementations (such as img-gen.ts). This will make the tool interface as flexible as the core OpenAI SDK API.