danielvdao
07/30/2025, 10:38 PMOpenRouter for the openai-provider generic client. I see that there's max_completion_token. I'm a bit confused by the documentation, should we be using max_completion_tokens or max_tokens? Here's my client setup for `OpenRouter`:
client<llm> OpenRouterLlama4Maverick {
provider openai-generic
options {
base_url "https://openrouter.ai/api/v1"
api_key env.OPENROUTER_API_KEY
model "meta-llama/llama-4-maverick"
temperature 0.25
frequency_penalty 0.5
max_completion_tokens 8191
allow_fallbacks false
provider {
only ["Groq", "Cerebras"]
sort "throughput"
allow_fallbacks false
}
}
}
For Groq:
client<llm> GroqLlama4Maverick17B {
provider openai-generic
options {
base_url "https://api.groq.com/openai/v1"
api_key env.GROQ_API_KEY
model "meta-llama/llama-4-maverick-17b-128e-instruct"
temperature 0.25
seed 42
service_tier "auto"
max_completion_tokens 8191
frequency_penalty 0.5
strategy [
OpenRouterLlama4Maverick
]
}
}
I ask because OpenRouter specifies using max_tokens instead [here](https://openrouter.ai/docs/api-reference/completion).Vaibhav (BAML 🐑)
07/30/2025, 10:39 PMVaibhav (BAML 🐑)
07/30/2025, 10:40 PMVaibhav (BAML 🐑)
07/30/2025, 10:40 PMdanielvdao
07/30/2025, 10:40 PMVaibhav (BAML 🐑)
07/30/2025, 10:41 PM