Gemini-pro from openrouter have context length of 91k but getting error
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5.5k
- Forks
- 433
- PR merge metrics
- No merged PRs in 30d
Description
openai.BadRequestError: Error code: 400 - {'error': {'message': "This model's maximum context length is 8192 tokens, however you requested 8977 tokens (8977 in your prompt; 0 for the completion). Please reduce your prompt; or completion length.", 'type': 'invalid_request_error', 'param': None, 'code': None}}
I am using routellm _ openrouter and this is the error I am getting when using google's gemini pro
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the request through RouteLLM with Gemini Pro via OpenRouter and compare the reported 8,192-token limit with the model's stated context length. Determine whether the discrepancy originates in RouteLLM or the OpenRouter model configuration; done means identifying the responsible layer and documenting or fixing the request behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai, api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100