File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
backend/src/llm-apis/vercel-ai-sdk Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import type { SecretAgentDefinition } from './types/secret-agent-definition'
66const definition : SecretAgentDefinition = {
77 id : 'base' ,
88 publisher,
9- ...base ( 'anthropic/claude-sonnet-4 ' ) ,
9+ ...base ( 'anthropic/claude-4- sonnet-20250522 ' ) ,
1010}
1111
1212export default definition
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ import {
88import { AgentTemplateTypes } from '../types/secret-agent-definition'
99
1010import type { SecretAgentDefinition } from '../types/secret-agent-definition'
11- import type { Model } from '@codebuff/common/constants '
11+ import { ModelName } from 'types/agent-definition '
1212
1313export const base = (
14- model : Model ,
14+ model : ModelName ,
1515 allAvailableAgents ?: string [ ] ,
1616) : Omit < SecretAgentDefinition , 'id' > => ( {
1717 model,
Original file line number Diff line number Diff line change @@ -180,9 +180,12 @@ export const promptAiSdkStream = async function* (
180180 cacheReadInputTokens =
181181 openrouterUsage . promptTokensDetails ?. cachedTokens ?? 0
182182 inputTokens = openrouterUsage . promptTokens - cacheReadInputTokens
183- costOverrideDollars =
184- ( openrouterUsage . cost ?? 0 ) +
185- ( openrouterUsage . costDetails ?. upstreamInferenceCost ?? 0 )
183+
184+ // Note (James): This seemed to be forcing 0 cost openrouter models where we use keys
185+ // so I disabled the cost override for now.
186+ costOverrideDollars = undefined
187+ // (openrouterUsage.cost ?? 0) +
188+ // (openrouterUsage.costDetails?.upstreamInferenceCost ?? 0)
186189 }
187190 }
188191
You can’t perform that action at this time.
0 commit comments