change default title model

This commit is contained in:
Aiden Cline
2025-10-22 10:41:08 -05:00
parent 074136b1e8
commit 9df61055e2

View File

@@ -121,9 +121,10 @@ export namespace Provider {
} }
case "ap": { case "ap": {
const isAustraliaRegion = ["ap-southeast-2", "ap-southeast-4"].includes(region) const isAustraliaRegion = ["ap-southeast-2", "ap-southeast-4"].includes(region)
if (isAustraliaRegion && ["anthropic.claude-sonnet-4-5", "anthropic.claude-haiku"].some((m) => if (
modelID.includes(m), isAustraliaRegion &&
)) { ["anthropic.claude-sonnet-4-5", "anthropic.claude-haiku"].some((m) => modelID.includes(m))
) {
regionPrefix = "au" regionPrefix = "au"
modelID = `${regionPrefix}.${modelID}` modelID = `${regionPrefix}.${modelID}`
} else { } else {
@@ -273,31 +274,31 @@ export namespace Provider {
cost: cost:
!model.cost && !existing?.cost !model.cost && !existing?.cost
? { ? {
input: 0, input: 0,
output: 0, output: 0,
cache_read: 0, cache_read: 0,
cache_write: 0, cache_write: 0,
} }
: { : {
cache_read: 0, cache_read: 0,
cache_write: 0, cache_write: 0,
...existing?.cost, ...existing?.cost,
...model.cost, ...model.cost,
}, },
options: { options: {
...existing?.options, ...existing?.options,
...model.options, ...model.options,
}, },
limit: model.limit ?? limit: model.limit ??
existing?.limit ?? { existing?.limit ?? {
context: 0, context: 0,
output: 0, output: 0,
}, },
modalities: model.modalities ?? modalities: model.modalities ??
existing?.modalities ?? { existing?.modalities ?? {
input: ["text"], input: ["text"],
output: ["text"], output: ["text"],
}, },
provider: model.provider ?? existing?.provider, provider: model.provider ?? existing?.provider,
} }
if (model.id && model.id !== modelID) { if (model.id && model.id !== modelID) {
@@ -509,7 +510,7 @@ export namespace Provider {
const provider = await state().then((state) => state.providers[providerID]) const provider = await state().then((state) => state.providers[providerID])
if (!provider) return if (!provider) return
const priority = ["3-5-haiku", "3.5-haiku", "gemini-2.5-flash", "gpt-5-nano"] const priority = ["claude-haiku-4-5", "anthropic/claude-haiku-4.5", "gemini-2.5-flash", "gpt-5-nano"]
for (const item of priority) { for (const item of priority) {
for (const model of Object.keys(provider.info.models)) { for (const model of Object.keys(provider.info.models)) {
if (model.includes(item)) return getModel(providerID, model) if (model.includes(item)) return getModel(providerID, model)
@@ -517,7 +518,7 @@ export namespace Provider {
} }
} }
const priority = ["gemini-2.5-pro-preview", "gpt-5", "claude-sonnet-4"] const priority = ["gemini-2.5-pro-preview", "gpt-5", "claude-sonnet-4-5"]
export function sort(models: ModelsDev.Model[]) { export function sort(models: ModelsDev.Model[]) {
return sortBy( return sortBy(
models, models,