Im using Gemini API with continue dev and jetbrains IDE. Im able to use other API such as OpenAI, but issues is always with Gemini
I always get this error even though I have a working billing account (created last week with a debit card).
Not enough context available to include the system message, last user message, and tools. There must be at least 1000 tokens remaining for output. Request had the following token counts: - contextLength: 8192 - counting safety buffer: 163.84 - tools: ~0 - system message: ~347 - last user or tool + tool call message tokens: ~6783 - max output tokens: 4096
here is my config,
"models": [
{
"model": "gemini-2.0-flash",
"provider": "gemini",
"apiKey": "KEY",
"title": "Gemini 2 flash",
"completionOptions": {
"temperature": 0.2,
"systemMessage": "You are an expert software engineer specializing in JavaScript. TypeScript and React, Vue. Provide well-structured, idiomatic, and performant solutions. Think step-by-step for complex problems. Offer alternative approaches when relevant."
}
},
{
"model": "gemini-2.5-pro-latest",
"provider": "gemini",
"apiKey": "KEY",
"title": "Gemini 2.5 pro",
"completionOptions": {
"temperature": 0.4,
"systemMessage": "You are an expert software engineer specializing in JavaScript. TypeScript and React, Vue. Provide well-structured, idiomatic, and performant solutions. Think step-by-step for complex problems. Offer alternative approaches when relevant."
}
},
{
"model": "claude-3-7-sonnet-20250219",
"contextLength": 200000,
"title": "Claude 3.7",
"apiKey": "KEY",
"provider": "anthropic"
},