diff --git a/src/app/api/chat/route.ts b/src/app/api/chat/route.ts index ee9323b..ec667cb 100644 --- a/src/app/api/chat/route.ts +++ b/src/app/api/chat/route.ts @@ -40,14 +40,14 @@ export const maxDuration = 60; const zen = (sessionId: string) => createOpenAICompatible({ name: 'zen', - baseURL: 'https://opencode.ai/zen/v1', + baseURL: 'https://opencode.ai/zen/go/v1', headers: { Authorization: `Bearer ${process.env.OPENCODE_API_KEY}`, 'x-opencode-session': sessionId, }, }); -const MODEL_ID = 'mimo-v2.5-free'; +const MODEL_ID = 'glm-5.3-flash'; const model = (sessionId: string) => zen(sessionId).chatModel(MODEL_ID); diff --git a/src/lib/abuse/cost.ts b/src/lib/abuse/cost.ts index f782403..e4112b7 100644 --- a/src/lib/abuse/cost.ts +++ b/src/lib/abuse/cost.ts @@ -8,7 +8,7 @@ export const MAX_TOKENS_PER_REQUEST = 4000; const MAX_COST_PER_HOUR_USD = 0.5; // ~$0.50/hour budget -const TOKEN_COST_PER_1M = 0.28; // mimo-v2.5 on OpenCode Go +const TOKEN_COST_PER_1M = 0.28; // glm-5.3-flash on OpenCode Go (conservative upper bound) const USAGE_WINDOW_MS = 60 * 60 * 1000; // 1 hour const CLEANUP_INTERVAL_MS = 300_000; // 5 min