ex_openai icon indicating copy to clipboard operation
ex_openai copied to clipboard

Support additional freeform parameters like "reasoning" and "reasoning_effort" for providers like OpenRouter

Open dvcrn opened this issue 6 months ago • 0 comments

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

dvcrn avatar Jun 06 '25 08:06 dvcrn