Skip to content

fix: cors sse, body limit, model prices, cheapest gap, limit trace, score precision#18

Merged
carlosatta merged 1 commit intodevelopfrom
fix/cors-sse-limits-scoring
Mar 27, 2026
Merged

fix: cors sse, body limit, model prices, cheapest gap, limit trace, score precision#18
carlosatta merged 1 commit intodevelopfrom
fix/cors-sse-limits-scoring

Conversation

@carlosatta
Copy link
Copy Markdown
Contributor

Changes

  • CORS on hijacked SSE streams (openai.ts, anthropic.ts): after reply.hijack(), manually set CORS headers on reply.raw@fastify/cors is bypassed after hijack, causing silent browser failures on streaming responses

  • Body limit 256MB (server.ts): Fastify default is 1MB; raised to 256MB to support vision uploads and large context requests

  • Model price fallback on edit (ModelFormPage.tsx): editModel() now substitutes preset prices when stored inputPerMillion/outputPerMillion are 0, preventing models from being treated as free by the cheapest policy

  • Cheapest policy gap (cheapest.ts): paidCeiling changed from 0.999 to 0.5 when free models exist — ensures a meaningful visual and scoring gap between free ## Changes

  • CORS on hijacked SSE streams (openai.ts, anthropic.ts): after reply.hijack(), manually set CORS headers on reply.raw@fastify/cors is bypassed after hijack, causing silent browser failures on streaming responses

  • **Bo)

  • **CORS di- Body limit 256MB (server.ts): Fastify default is 1MB; raised to 256MB to support vision uploads and large context requests

  • Model price fallback on edit (ModelFormPage.tsx): editModel() now substitutes preset pric e- Model price fallback on edit (ModelFormPage.tsx): editModel() now substitutes preset prices when stored inputPerMillio c- **Cheapest policy gation to reflect new 0.5` ceiling

@carlosatta carlosatta merged commit 4ee7701 into develop Mar 27, 2026
2 checks passed
@carlosatta carlosatta deleted the fix/cors-sse-limits-scoring branch March 27, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant