File tree Expand file tree Collapse file tree 6 files changed +11
-11
lines changed
Expand file tree Collapse file tree 6 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 1- import { geminiModels , openaiModels } from '@codebuff/common/old-constants'
1+ import { models , openaiModels } from '@codebuff/common/old-constants'
22import { buildArray } from '@codebuff/common/util/array'
33import { parseMarkdownCodeBlock } from '@codebuff/common/util/file'
44import { generateCompactId , hasLazyEdit } from '@codebuff/common/util/string'
@@ -208,7 +208,7 @@ Do not write anything else.
208208 clientSessionId,
209209 fingerprintId,
210210 userInputId,
211- model : geminiModels . gemini2flash ,
211+ model : models . openrouter_gemini2_5_flash ,
212212 userId,
213213 } )
214214 const shouldAddPlaceholderComments = response . includes ( 'LOCAL_CHANGE_ONLY' )
Original file line number Diff line number Diff line change @@ -344,7 +344,7 @@ async function getRelevantFiles(
344344 let response = await promptFlashWithFallbacks ( codebuffMessages , {
345345 clientSessionId,
346346 userInputId,
347- model : models . gemini2flash ,
347+ model : models . openrouter_gemini2_5_flash ,
348348 userId,
349349 useFinetunedModel : finetunedModel ,
350350 fingerprintId,
Original file line number Diff line number Diff line change 1- import { geminiModels } from '@codebuff/common/old-constants'
1+ import { models } from '@codebuff/common/old-constants'
22import { closeXml } from '@codebuff/common/util/xml'
33import { uniq } from 'lodash'
44import { z } from 'zod/v4'
@@ -166,7 +166,7 @@ ${closeXml('user_query')}
166166 ...options ,
167167 messages : [ { role : 'user' , content : prompt } ] ,
168168 userId : options . userId ,
169- model : geminiModels . gemini2flash ,
169+ model : models . openrouter_gemini2_5_flash ,
170170 temperature : 0 ,
171171 schema : z . object ( {
172172 libraries : z . array (
@@ -227,7 +227,7 @@ ${closeXml('documentation_chunks')}
227227 userInputId : options . userInputId ,
228228 fingerprintId : options . fingerprintId ,
229229 userId : options . userId ,
230- model : geminiModels . gemini2_5_flash ,
230+ model : models . openrouter_gemini2_5_flash ,
231231 temperature : 0 ,
232232 schema : z . object ( {
233233 relevant_chunks : z . array ( z . number ( ) ) ,
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { promptAiSdk } from './vercel-ai-sdk/ai-sdk'
66import type {
77 CostMode ,
88 FinetunedVertexModel ,
9- GeminiModel ,
9+ Model ,
1010} from '@codebuff/common/old-constants'
1111import type { Message } from '@codebuff/common/types/messages/codebuff-message'
1212
@@ -41,7 +41,7 @@ export async function promptFlashWithFallbacks(
4141 clientSessionId : string
4242 fingerprintId : string
4343 userInputId : string
44- model : GeminiModel
44+ model : Model
4545 userId : string | undefined
4646 maxTokens ?: number
4747 temperature ?: number
Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ import {
44 getUserCostPerCredit ,
55} from '@codebuff/billing'
66import { trackEvent } from '@codebuff/common/analytics'
7- import { models , TEST_USER_ID } from '@codebuff/common/old-constants'
87import { AnalyticsEvent } from '@codebuff/common/constants/analytics-events'
98import db from '@codebuff/common/db/index'
109import * as schema from '@codebuff/common/db/schema'
10+ import { models , TEST_USER_ID } from '@codebuff/common/old-constants'
1111import { withRetry } from '@codebuff/common/util/promise'
1212import { stripeServer } from '@codebuff/common/util/stripe'
1313import { logSyncFailure } from '@codebuff/common/util/sync-failure'
Original file line number Diff line number Diff line change @@ -256,8 +256,8 @@ export const models = {
256256} as const
257257
258258export const shortModelNames = {
259- 'gemini-2.5-pro' : models . gemini2_5_pro_preview ,
260- 'flash-2.5' : models . gemini2_5_flash ,
259+ 'gemini-2.5-pro' : models . openrouter_gemini2_5_pro_preview ,
260+ 'flash-2.5' : models . openrouter_gemini2_5_flash ,
261261 'opus-4' : models . openrouter_claude_opus_4 ,
262262 'sonnet-4' : models . openrouter_claude_sonnet_4 ,
263263 'sonnet-3.7' : models . openrouter_claude_sonnet_4 ,
You can’t perform that action at this time.
0 commit comments