Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

Keep GPT-5.6 Luna out of tool-heavy pipes

Louis Beaumont45105b5ee837
diff --git a/packages/ai-gateway/src/handlers/chat.ts b/packages/ai-gateway/src/handlers/chat.ts
index a4f164314..bce07dc87 100644
--- a/packages/ai-gateway/src/handlers/chat.ts
+++ b/packages/ai-gateway/src/handlers/chat.ts
@@ -43,12 +43,12 @@ export const AUTO_WATERFALL_VISION = [
// lacks). Measured (6/19): gpt-5.4 here cost $590/day vs $177 on flex for the SAME
// traffic — 3.3x more, on the small OpenAI pool, for a marginal IQ gain (54 vs ~50-55)
// that pipes don't need; reverted (#4285→). glm-5 + gemini-3-flash are standard-tier
-// fallbacks for when flex is throttled. Luna is a paid, high-volume fallback
-// immediately after the flex primary: it improves resilience without replacing
-// the proven cache-efficient default for every scheduled run.
+// fallbacks for when flex is throttled. Keep Luna out of this tool-heavy lane:
+// GPT-5.6 Luna can serve ordinary background chat, but tool-enabled Pi pipe
+// requests currently fall through to GLM. Retrying it here would add latency
+// without actually serving the pipe.
export const AUTO_WATERFALL_BACKGROUND = [
'gemini-3.5-flash', // flex tier — cheapest on the cache-heavy background mix
- 'gpt-5.6-luna', // paid fallback when the flex primary is unavailable
'glm-5', // free Vertex MaaS fallback, standard tier
'gemini-3-flash', // near-free safety net
];
diff --git a/packages/ai-gateway/src/test/auto-cost-attribution.unit.test.ts b/packages/ai-gateway/src/test/auto-cost-attribution.unit.test.ts
index 95c68ef68..caddf35cf 100644
--- a/packages/ai-gateway/src/test/auto-cost-attribution.unit.test.ts
+++ b/packages/ai-gateway/src/test/auto-cost-attribution.unit.test.ts
@@ -73,10 +73,10 @@ describe('routing chains stay priceable (no silent $0.01 fallback rows)', () =>
expect(getModelCost('gemini-3-flash', 1_000_000, 0)).toBeCloseTo(0.10, 10);
});
- it('places Luna behind the current auto primaries for text, vision, and pipes', () => {
+ it('places Luna behind the current chat primaries but keeps tool-heavy pipes on proven models', () => {
const luna = 'gpt-5.6-luna';
expect(AUTO_WATERFALL.indexOf('glm-5')).toBeLessThan(AUTO_WATERFALL.indexOf(luna));
expect(AUTO_WATERFALL_VISION.indexOf('gemini-3.5-flash')).toBeLessThan(AUTO_WATERFALL_VISION.indexOf(luna));
- expect(AUTO_WATERFALL_BACKGROUND.indexOf('gemini-3.5-flash')).toBeLessThan(AUTO_WATERFALL_BACKGROUND.indexOf(luna));
+ expect(AUTO_WATERFALL_BACKGROUND).not.toContain(luna);
});
});