Conversation
- Switch base2-free, editor-lite, code-reviewer-lite agents from kimi-k2.6 to z-ai/glm-5.1 - Update FREEBUFF_KIMI_MODEL_ID → FREEBUFF_GLM_MODEL_ID constant - Update Fireworks deployment map (mjb4i7ea), model map, and pricing - Remove moonshotai/kimi-k2.6 and kimi-k2.6:nitro from ModelName type - Update freebuff model selector to show GLM first with 'Smartest' tagline - Update all test files with new model IDs and deployment IDs - Update docs and scripts to reference GLM instead of Kimi
Greptile SummaryThis PR replaces Kimi K2.6 with GLM 5.1 as the freebuff deployment-hours model and introduces a time-bounded availability system: GLM 5.1 is only selectable 9am ET–5pm PT on weekdays (backed by a dedicated Fireworks deployment), while MiniMax M2.7 remains always-on via serverless. The key architectural change is the removal of the serverless fallback for deployment-model failures — errors now surface explicitly as 503s so the client can redirect users to MiniMax instead of silently degrading quality. The implementation is thorough: Confidence Score: 5/5Safe to merge — all changes are well-guarded, test clocks are deterministic, and no P0/P1 issues found. The PR implements a clean model swap with correct dual-timezone window logic, consistent availability enforcement at every layer (session admission, Fireworks routing, CLI store, and selector), and a bonus fix to a pre-existing No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User selects model in CLI] --> B{isFreebuffModelAvailable?}
B -- "GLM 5.1 + inside 9am ET-5pm PT weekday" --> C[POST /freebuff/session with z-ai/glm-5.1]
B -- "GLM 5.1 + outside hours" --> D[Show Closed · Switch to MiniMax]
B -- "MiniMax M2.7 always" --> E[POST /freebuff/session with minimax/minimax-m2.7]
C --> F{Server: isFreebuffModelAvailable?}
E --> G[Queue / admit immediately]
F -- "available" --> G
F -- "unavailable 409 model_unavailable" --> H[Client: setSelectedModel DEFAULT → retry GET]
G --> I{Admission tick}
I -- "MiniMax: health check only" --> J[Admit from MiniMax queue]
I -- "GLM: outside hours → unhealthy" --> K[GLM queue paused]
I -- "GLM: inside hours + healthy" --> L[Admit from GLM queue]
L --> M[Chat completions: createFireworksRequestWithFallback]
J --> N[Chat completions: serverless MiniMax]
M --> O{isDeploymentHours?}
O -- "yes + not cooling down" --> P[Try deployment mjb4i7ea]
O -- "no → 503 DEPLOYMENT_OUTSIDE_HOURS" --> Q[Surface error to client]
P -- "success" --> R[Return response]
P -- "5xx" --> S[Return 503 — no serverless fallback]
Reviews (1): Last reviewed commit: "feat: replace Kimi K2.6 with GLM 5.1 as ..." | Re-trigger Greptile |
Summary
Add deployment hours availability policy for freebuff models. GLM 5.1 is now only available during 9am ET - 5pm PT on weekdays, while MiniMax M2.7 remains always available.
Availability system:
availabilityfield onFreebuffModelOption:'always'or'deployment_hours'isFreebuffDeploymentHours()helper: checks Mon-Fri, 9am ET to 5pm PTisFreebuffModelAvailable()andresolveAvailableFreebuffModel()utilitiesFREEBUFF_DEPLOYMENT_HOURS_LABELconstant:'9am ET-5pm PT'CLI model selector:
useNowhook (updates every minute)Server-side:
Fireworks deployment:
Test plan