added router details to usage endpoint
This commit is contained in:
@@ -675,12 +675,21 @@ const server = createServer(async (req, res) => {
|
||||
notes.push("Anthropic has no public balance API — check console.anthropic.com");
|
||||
notes.push("Z.ai is flat-rate; no balance API available");
|
||||
|
||||
// Build routing summary (the 3 Claude Code / Roo Code tiers)
|
||||
const routing = {
|
||||
sonnet: { provider: "zai", model: "glm-4.7", description: "Daily workhorse (Z.ai flat-rate)" },
|
||||
opus: { provider: "anthropic", model: "claude-opus-4-6", description: "Complex tasks (Anthropic pay-per-token)" },
|
||||
haiku: { provider: "deepseek", model: "deepseek-chat", description: "Trivial/fast tasks (DeepSeek cheap tier)" },
|
||||
default: { provider: "zai", model: "glm-4.7", description: "Unknown models fall back here" },
|
||||
};
|
||||
|
||||
res.writeHead(200, { "content-type": "application/json" });
|
||||
res.end(
|
||||
JSON.stringify({
|
||||
service: "ein-ai-proxy",
|
||||
generatedAt: new Date().toISOString(),
|
||||
currentPeriod,
|
||||
routing,
|
||||
providers,
|
||||
totals: {
|
||||
...totals,
|
||||
|
||||
Reference in New Issue
Block a user