[分享创造] 自己用 AI 写代码写到肉疼,干脆做了一个多模型网关 + 网页聊天,聊聊踩过的坑
平时主要用 OpenCode / Claude Code 写代码,每个月光订阅和 API 就是一笔不小的开销,而且不同模型要开不同平台、管一堆 Key ,切来切去很烦。 所以这几个月下班后自己折腾了一个小项目: 一个 Key 调用多个模型 ( DeepSeek 、GLM 、Kimi 、Claude 、GPT 等),兼容 OpenAI / Anthropic 两种格式,在 OpenCode 、Claude Code 、Cursor 里改个 base URL 就能用。 后来朋友说不想配客户端,就又加了一个 网页聊天 ,体验类似 Claude 网页版,登录就能直接和各个模型对话、切换模型对比效果。 做的过程中印象比较深的几个点: 两种 API 格式兼容 :OpenAI 和 Anthropic 的流式返回格式差别不小,Claude Code 对格式挺挑的,调了很久才稳定。 计费 :按 token 实时扣费,要处理流式中断、重试导致的重复计费,这块比想象中麻烦。 登录 :最后只保留了 Google 和 Telegram 登录,省掉了邮箱验证那一套。 充值 :目前只接了加密货币,最低 $1 ,余额
Read original sourceSource record
Research analysis
What changed
Source account: 平时主要用 OpenCode / Claude Code 写代码,每个月光订阅和 API 就是一笔不小的开销,而且不同模型要开不同平台、管一堆 Key ,切来切去很烦。 所以这几个月下班后自己折腾了一个小项目: 一个 Key 调用多个模型 ( DeepSeek 、GLM 、Kimi 、Claude 、GPT 等),兼容 OpenAI / Anthropic 两种格式,在 OpenCode 、Claude Code 、Cursor 里改个 base URL 就能用。 后来朋友说不想配客户端,就又加了一个 网页聊天 ,体验类似 Claude 网页版,登录就能直接和各个模型对话、切换模型对比效果。 做的过程中印象比较深的几个点: 两种 API 格式兼容 :OpenAI 和 Anthropic 的流式返回格式差别不小,Claude Code 对格式挺挑的,调了很久才稳定。 计费 :按 token 实时扣费,要处理流式中断、重试导致的重复计费,这块比想象中麻烦。 登录 :最后只保留了 Google 和 Telegram 登录,省掉了邮箱验证那一套。 充值 :目前只接了加密货币,最低 $1 ,余额
Version & cost evidence
Recent records to compare: “Show HN: A terminal viewer for plain text data files (JSON,YAML,CSV,XML,)” (Hacker News, Nov 5, 2026); “Show HN: Typos – Render Typst Documents to Thermal Printers (Go and ESC/POS)” (Show HN, Nov 5, 2026). Shared themes are navigation hints; they have not been verified as the same need or independent corroboration.
Who is affected
Identify the existing workflow this change affects before recommending an upgrade. Launch attention does not establish improvement; an API, pricing or availability change may instead create migration work.
Missing comparison points
Missing checks: old versus new behavior, affected plans and regions, availability date, compatibility, rollback path and cost under the same workload.
Migration check
Save the release or policy notice, run the same task on the old and new option, and compare outputs and the full bill. For retirement notices, verify the deadline before scheduling migration.