ex_openai
ex_openai copied to clipboard
Support additional freeform parameters like "reasoning" and "reasoning_effort" for providers like OpenRouter
OpenRouter specifies reasoning like this: https://openrouter.ai/docs/use-cases/reasoning-tokens
{
"model": "your-model",
"messages": [],
"reasoning": {
// One of the following (not both):
"effort": "high", // Can be "high", "medium", or "low" (OpenAI-style)
"max_tokens": 2000, // Specific token limit (Anthropic-style)
// Optional: Default is false. All models support this.
"exclude": false // Set to true to exclude reasoning tokens from response
}
}
While OpenAI just expects reasoning_effort
We should provide a way to specify either custom parameters, or to directly support OpenRouter