Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/agent/compact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ function pickCompactionModel(primaryModel: string): string {
if (primaryModel.includes('opus') || primaryModel.includes('pro')) {
return 'anthropic/claude-sonnet-4.6';
}
if (primaryModel.includes('sonnet') || primaryModel.includes('gpt-5.4') || primaryModel.includes('gemini-2.5-pro')) {
if (primaryModel.includes('sonnet') || primaryModel.includes('gpt-5.4') || primaryModel.includes('gpt-5.5') || primaryModel.includes('gemini-2.5-pro')) {
return 'anthropic/claude-haiku-4.5-20251001';
}
if (primaryModel.includes('haiku') || primaryModel.includes('mini') || primaryModel.includes('nano')) {
Expand Down
1 change: 1 addition & 0 deletions src/agent/optimize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const MODEL_MAX_OUTPUT: Record<string, number> = {
'anthropic/claude-opus-4.6': 32_000,
'anthropic/claude-sonnet-4.6': 64_000,
'anthropic/claude-haiku-4.5-20251001': 16_384,
'openai/gpt-5.5': 32_768,
'openai/gpt-5.4': 32_768,
'openai/gpt-5-mini': 16_384,
'google/gemini-2.5-pro': 65_536,
Expand Down
4 changes: 4 additions & 0 deletions src/agent/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ const MODEL_CONTEXT_WINDOWS: Record<string, number> = {
'anthropic/claude-haiku-4.5': 200_000,
'anthropic/claude-haiku-4.5-20251001': 200_000,
// OpenAI
// gpt-5.5 advertises 1.05M context at the gateway, but Franklin keeps the
// conservative 128k baseline matching every other gpt-5.x line — bump in
// a separate change once a real >128k call has been verified end-to-end.
'openai/gpt-5.5': 128_000,
'openai/gpt-5.4': 128_000,
'openai/gpt-5.4-pro': 128_000,
'openai/gpt-5.3': 128_000,
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ program
.description('Start the franklin agent')
.option(
'-m, --model <model>',
'Model to use (e.g. openai/gpt-5.4, anthropic/claude-sonnet-4.6). Default from config or claude-sonnet-4.6'
'Model to use (e.g. openai/gpt-5.5, anthropic/claude-sonnet-4.6). Default from config or claude-sonnet-4.6'
)
.option('--debug', 'Enable debug logging')
.option('--trust', 'Trust mode — skip permission prompts for all tools')
Expand Down
1 change: 1 addition & 0 deletions src/pricing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const MODEL_PRICING: Record<string, { input: number; output: number; perC
'openai/o3-mini': { input: 1.1, output: 4.4 },
'openai/o4-mini': { input: 1.1, output: 4.4 },
'openai/o1': { input: 15.0, output: 60.0 },
'openai/gpt-5.5': { input: 5.0, output: 30.0 },
'openai/gpt-5.2-pro': { input: 21.0, output: 168.0 },
'openai/gpt-5.4-pro': { input: 30.0, output: 180.0 },
// Google
Expand Down
8 changes: 5 additions & 3 deletions src/proxy/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@ const MODEL_SHORTCUTS: Record<string, string> = {
'opus-4.6': 'anthropic/claude-opus-4.6',
haiku: 'anthropic/claude-haiku-4.5',
// OpenAI
gpt: 'openai/gpt-5.4',
gpt5: 'openai/gpt-5.4',
'gpt-5': 'openai/gpt-5.4',
// `gpt` / `gpt5` / `gpt-5` follow the gateway's flagship — currently 5.5.
gpt: 'openai/gpt-5.5',
gpt5: 'openai/gpt-5.5',
'gpt-5': 'openai/gpt-5.5',
'gpt-5.5': 'openai/gpt-5.5',
'gpt-5.4': 'openai/gpt-5.4',
'gpt-5.4-pro': 'openai/gpt-5.4-pro',
'gpt-5.3': 'openai/gpt-5.3',
Expand Down
6 changes: 3 additions & 3 deletions src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ const AUTO_TIERS: Record<Tier, { primary: string; fallback: string[] }> = {
},
MEDIUM: {
primary: 'anthropic/claude-sonnet-4.6',
fallback: ['openai/gpt-5.4', 'google/gemini-3.1-pro', 'moonshot/kimi-k2.6'],
fallback: ['openai/gpt-5.5', 'google/gemini-3.1-pro', 'moonshot/kimi-k2.6'],
},
COMPLEX: {
primary: 'anthropic/claude-sonnet-4.6',
fallback: ['openai/gpt-5.4', 'anthropic/claude-opus-4.7', 'moonshot/kimi-k2.6'],
fallback: ['openai/gpt-5.5', 'anthropic/claude-opus-4.7', 'moonshot/kimi-k2.6'],
},
REASONING: {
// Opus 4.7: step-change improvement in agentic coding over 4.6 per
Expand Down Expand Up @@ -112,7 +112,7 @@ const PREMIUM_TIERS: Record<Tier, { primary: string; fallback: string[] }> = {
},
COMPLEX: {
primary: 'anthropic/claude-opus-4.7',
fallback: ['anthropic/claude-opus-4.6', 'openai/gpt-5.4', 'anthropic/claude-sonnet-4.6'],
fallback: ['anthropic/claude-opus-4.6', 'openai/gpt-5.5', 'anthropic/claude-sonnet-4.6'],
},
REASONING: {
primary: 'anthropic/claude-opus-4.7',
Expand Down
11 changes: 7 additions & 4 deletions src/ui/model-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ export const MODEL_SHORTCUTS: Record<string, string> = {
'opus-4.6': 'anthropic/claude-opus-4.6',
haiku: 'anthropic/claude-haiku-4.5-20251001',
// OpenAI
gpt: 'openai/gpt-5.4',
gpt5: 'openai/gpt-5.4',
'gpt-5': 'openai/gpt-5.4',
// `gpt` / `gpt5` / `gpt-5` follow the gateway's flagship — currently 5.5.
gpt: 'openai/gpt-5.5',
gpt5: 'openai/gpt-5.5',
'gpt-5': 'openai/gpt-5.5',
'gpt-5.5': 'openai/gpt-5.5',
'gpt-5.4': 'openai/gpt-5.4',
'gpt-5.4-pro': 'openai/gpt-5.4-pro',
'gpt-5.3': 'openai/gpt-5.3',
Expand Down Expand Up @@ -127,7 +129,8 @@ export const PICKER_CATEGORIES: ModelCategory[] = [
{ id: 'anthropic/claude-opus-4.7', shortcut: 'opus', label: 'Claude Opus 4.7', price: '$5/$25', highlight: true },
{ id: 'anthropic/claude-sonnet-4.6', shortcut: 'sonnet', label: 'Claude Sonnet 4.6', price: '$3/$15' },
{ id: 'anthropic/claude-opus-4.6', shortcut: 'opus-4.6', label: 'Claude Opus 4.6', price: '$5/$25' },
{ id: 'openai/gpt-5.4', shortcut: 'gpt', label: 'GPT-5.4', price: '$2.5/$15' },
{ id: 'openai/gpt-5.5', shortcut: 'gpt', label: 'GPT-5.5', price: '$5/$30', highlight: true },
{ id: 'openai/gpt-5.4', shortcut: 'gpt-5.4', label: 'GPT-5.4', price: '$2.5/$15' },
{ id: 'openai/gpt-5.4-pro', shortcut: 'gpt-5.4-pro', label: 'GPT-5.4 Pro', price: '$30/$180' },
{ id: 'google/gemini-2.5-pro', shortcut: 'gemini', label: 'Gemini 2.5 Pro', price: '$1.25/$10' },
{ id: 'google/gemini-3.1-pro', shortcut: 'gemini-3', label: 'Gemini 3.1 Pro', price: '$2/$12' },
Expand Down
Loading