Plugin Type
VSCode Extension
Cline Version
3.79
What happened?
The current configuration in src/shared/api.ts for both vertex and gemini has incorrect config which causes it to report incorrect pricing . The json portions copied below from the api.ts have 4 bugs:
- It uses
cacheWritesPrice: 0.05 in vertex and skips cacheReadsPrice entirely which in later API cost calculations causes the cacheReadPrice to be inferred as 0 hence the cacheRead cost is not reported
cacheWritesPrice: 0.05 is also wrong because cache writes are free on these models
- In gemini config, it uses 2 pricing tiers, which is incorrect. This model does not have context tiered pricing
- The actual cacheReadsPrice in those tiers is also wrong. Should be 0.05, not 0.03.
vertex:
"gemini-3-flash-preview": {
maxTokens: 65536,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
supportsGlobalEndpoint: true,
inputPrice: 0.5,
outputPrice: 3.0,
cacheWritesPrice: 0.05,
temperature: 1.0,
supportsReasoning: true,
thinkingConfig: {
geminiThinkingLevel: "high",
supportsThinkingLevel: true,
},
},
gemini:
"gemini-3-flash-preview": {
maxTokens: 65536,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
supportsGlobalEndpoint: true,
inputPrice: 0.5,
outputPrice: 3.0,
cacheWritesPrice: 0.05,
supportsReasoning: true,
thinkingConfig: {
geminiThinkingLevel: "low",
supportsThinkingLevel: true,
},
tiers: [
{
contextWindow: 200000,
inputPrice: 0.3,
outputPrice: 2.5,
cacheReadsPrice: 0.03,
},
{
contextWindow: Number.POSITIVE_INFINITY,
inputPrice: 0.3,
outputPrice: 2.5,
cacheReadsPrice: 0.03,
},
],
},
Steps to reproduce
Run this model and compare the API costs
Provider/Model
gemini:gemini-3-flash-preview,vertex:gemini-3-flash-preview
System Information
Not Applicable
Plugin Type
VSCode Extension
Cline Version
3.79
What happened?
The current configuration in
src/shared/api.tsfor both vertex and gemini has incorrect config which causes it to report incorrect pricing . The json portions copied below from the api.ts have 4 bugs:cacheWritesPrice: 0.05in vertex and skips cacheReadsPrice entirely which in later API cost calculations causes the cacheReadPrice to be inferred as 0 hence the cacheRead cost is not reportedcacheWritesPrice: 0.05is also wrong because cache writes are free on these modelsvertex:
"gemini-3-flash-preview": {
maxTokens: 65536,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
supportsGlobalEndpoint: true,
inputPrice: 0.5,
outputPrice: 3.0,
cacheWritesPrice: 0.05,
temperature: 1.0,
supportsReasoning: true,
thinkingConfig: {
geminiThinkingLevel: "high",
supportsThinkingLevel: true,
},
},
gemini:
"gemini-3-flash-preview": {
maxTokens: 65536,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
supportsGlobalEndpoint: true,
inputPrice: 0.5,
outputPrice: 3.0,
cacheWritesPrice: 0.05,
supportsReasoning: true,
thinkingConfig: {
geminiThinkingLevel: "low",
supportsThinkingLevel: true,
},
tiers: [
{
contextWindow: 200000,
inputPrice: 0.3,
outputPrice: 2.5,
cacheReadsPrice: 0.03,
},
{
contextWindow: Number.POSITIVE_INFINITY,
inputPrice: 0.3,
outputPrice: 2.5,
cacheReadsPrice: 0.03,
},
],
},
Steps to reproduce
Run this model and compare the API costs
Provider/Model
gemini:gemini-3-flash-preview,vertex:gemini-3-flash-preview
System Information
Not Applicable