openrouter_chat_completion
Execute chat inference on any OpenRouter model using a prompt or role-based messages, with optional token, temperature, and reasoning controls.
Instructions
Execute chat inference on any model available on OpenRouter (e.g. google/gemini-2.5-flash, anthropic/claude-3.7-sonnet, deepseek/deepseek-v4-flash-0731:US, meta-llama/llama-3.3-70b-instruct).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | OpenRouter model ID (default: 'google/gemini-2.5-flash'). | google/gemini-2.5-flash |
| prompt | No | Simple prompt string (fallback if 'messages' is omitted). | |
| messages | No | Array of messages [{role: 'user'|'system'|'assistant', content: '...'}] | |
| reasoning | No | Thinking / reasoning config (e.g. { effort: 'high' } or { enabled: true }). | |
| max_tokens | No | Maximum completion tokens limit. | |
| temperature | No | Sampling temperature (0.0 to 2.0). |