Skip to content

Commit 66a813c

Browse files
carterworksclaude
andauthored
Update summarization model to GPT-OSS with fallback chain (#41)
Changed default AI model for summarization: - Primary: openai/gpt-oss-120b:presto - Fallback 1: openai/gpt-oss-20b:presto - Fallback 2: anthropic/claude-haiku-4.5 Added new models to the models object for better organization. Co-authored-by: Claude <noreply@anthropic.com>
1 parent 5fa9c26 commit 66a813c

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/services/ai.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,32 @@ const models = Object.freeze({
2121
nano: "openai/gpt-5-nano", // $0.05/1M input, $0.40/1M output,
2222
mini: "openai/gpt-5-mini", // $0.25/1M input, $2.00/1M output,
2323
},
24+
gptOss: {
25+
presto120b: "openai/gpt-oss-120b:presto",
26+
presto20b: "openai/gpt-oss-20b:presto",
27+
},
2428
},
2529
google: {
2630
gemini2dot5: {
2731
flash: "google/gemini-2.5-flash", // $0.30/1M input, $2.50/1M output
2832
flashLite: "google/gemini-2.5-flash-lite", // $0.10/1M input, $0.40/1M output
2933
},
3034
},
35+
anthropic: {
36+
claude: {
37+
haiku45: "anthropic/claude-haiku-4.5",
38+
},
39+
},
3140
});
3241

3342
export async function fetchCompletion(
3443
systemPrompt: string,
3544
userPrompt: string,
3645
reasoning: "minimal" | "low" | "medium" | "high" = "medium",
37-
model = models.openai.gpt5.nano,
46+
model = models.openai.gptOss.presto120b,
3847
fallbackModels = [
39-
models.google.gemini2dot5.flashLite,
40-
models.openai.gpt5.mini,
48+
models.openai.gptOss.presto20b,
49+
models.anthropic.claude.haiku45,
4150
],
4251
) {
4352
if (!AI_ENABLED) {

0 commit comments

Comments
 (0)