详情

首页手游攻略 WorkBuddy 实战:一键接入 ZenMux:用一套 Key 调 200+ 大模型

WorkBuddy 实战:一键接入 ZenMux:用一套 Key 调 200+ 大模型

佚名 2026-07-18 17:12:16
{"type":"doc","content":[{"type":"heading","attrs":{"id":"4a6ca87b-c86a-404f-a360-9d0616f475ed","textAlign":"inherit","indent":0,"level":1,"isHoverDragHandle":false},"content":[{"type":"text","text":"WorkBuddy 实战:一键接入 ZenMux,用一套 Key 调 200 大模型"}]},{"type":"blockquote","attrs":{"id":"568376e8-5117-4a7a-80db-248ac9f0960a","textAlign":"inherit","isHoverDragHandle":false},"content":[{"type":"paragraph","attrs":{"id":"c5b0392e-3ad2-4fa6-a116-b408c40e0261","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"本文记录如何在 WorkBuddy 中接入 ZenMux AI 网关,实现用一套 API Key 调用 OpenAI、Anthropic、Google、DeepSeek 等 200 模型,并附完整 Python 示例代码。"}]}]},{"type":"heading","attrs":{"id":"1c6837dc-cd98-4a5a-9853-d39f4d4ac53e","textAlign":"inherit","indent":0,"level":2,"isHoverDragHandle":false},"content":[{"type":"text","text":"背景"}]},{"type":"paragraph","attrs":{"id":"679d57e3-6398-455a-8207-69ba83377655","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"WorkBuddy 的积分是按模型调用消耗的,高频使用成本不低。有没有办法"绕开"积分消耗,用自己的模型 Key 跑任务?"}]},{"type":"paragraph","attrs":{"id":"70ec87c0-0964-49dc-b853-c08c1c57b55b","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"答案是:"},{"type":"text","marks":[{"type":"bold"}],"text":"有"},{"type":"text","text":"。通过 AI 网关(如 ZenMux),你可以用自己的 API Key 直接调模型,不走 WorkBuddy 积分。"}]},{"type":"paragraph","attrs":{"id":"541c634e-ee37-40d5-a82a-63652528505e","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"本文以 "},{"type":"text","marks":[{"type":"bold"}],"text":"ZenMux"},{"type":"text","text":" 为例,手把手教你接入。"}]},{"type":"horizontalRule","attrs":{"id":"adef1287-b580-49cf-b2a2-5f20c64d25a5","isHoverDragHandle":false}},{"type":"heading","attrs":{"id":"73b6a835-b46c-4713-b132-4e47f9eadb5a","textAlign":"inherit","indent":0,"level":2,"isHoverDragHandle":false},"content":[{"type":"text","text":"什么是 ZenMux?"}]},{"type":"paragraph","attrs":{"id":"23608d2e-2468-427f-b6b9-cdad13eeb321","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"ZenMux 是一个企业级 AI API 网关,核心特性:"}]},{"type":"bulletList","attrs":{"id":"96f51ada-8037-4ae2-b1db-39d6e59ef162","isHoverDragHandle":false},"content":[{"type":"listItem","attrs":{"id":"814efb0b-abcd-40f6-8d1e-5d898d3ed48d"},"content":[{"type":"paragraph","attrs":{"id":"afed5624-bd3f-46da-8684-96164d7c56d1","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"统一接口"},{"type":"text","text":":支持 OpenAI / Anthropic / Google Gemini 四种协议,用任意一个 SDK 就能调所有模型"}]}]},{"type":"listItem","attrs":{"id":"34b3e734-49e6-427a-a97b-d6e6399530b6"},"content":[{"type":"paragraph","attrs":{"id":"658ed4ae-9ba7-4e44-bf7a-44f70c8024ad","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"200 模型"},{"type":"text","text":":OpenAI、Claude、Gemini、DeepSeek、Doubao、GLM 等全部聚合"}]}]},{"type":"listItem","attrs":{"id":"e1d863f8-a1a6-4dd1-b347-170e92986f13"},"content":[{"type":"paragraph","attrs":{"id":"cafa34e5-f18f-4f55-a07b-b9d592560c48","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"协议无关"},{"type":"text","text":":用 OpenAI SDK 调 Claude,用 Anthropic SDK 调 Gemini,随意混用"}]}]},{"type":"listItem","attrs":{"id":"b7f95301-0c69-40d1-af9d-6257368d1191"},"content":[{"type":"paragraph","attrs":{"id":"63436be0-42ef-4761-8587-ff5630393bf0","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"兼容 OpenAI 格式"},{"type":"text","text":":现有代码几乎不用改"}]}]}]},{"type":"horizontalRule","attrs":{"id":"8ee17817-bfee-48bc-a030-00371ae15ea3","isHoverDragHandle":false}},{"type":"heading","attrs":{"id":"55cc743f-1bfd-4724-b141-f9caf3306ac9","textAlign":"inherit","indent":0,"level":2,"isHoverDragHandle":false},"content":[{"type":"text","text":"第一步:获取 ZenMux API Key"}]},{"type":"orderedList","attrs":{"id":"65f2e688-4ae0-4e51-abfb-d2d08f1297d9","start":1,"isHoverDragHandle":false},"content":[{"type":"listItem","attrs":{"id":"2ad280e8-0b3a-4cd5-a6e8-0a191a9757d2"},"content":[{"type":"paragraph","attrs":{"id":"7a7e003d-5ea2-4893-a813-05594adf2821","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"访问 "},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://zenmux.ai/login","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"zenmux.ai/login"},{"type":"text","text":"(支持邮箱 / GitHub / Google 登录)"}]}]},{"type":"listItem","attrs":{"id":"92254864-f5fb-4ec9-be3d-1993eee59d51"},"content":[{"type":"paragraph","attrs":{"id":"6d5a4a8e-23d1-4331-94f9-1364e53c9e9f","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"登录后进入 "},{"type":"text","marks":[{"type":"bold"}],"text":"PAYG API"},{"type":"text","text":" 页面"}]}]},{"type":"listItem","attrs":{"id":"d9c77751-54de-4513-893a-625fd130dbe1"},"content":[{"type":"paragraph","attrs":{"id":"713e2913-f6dd-4921-95f1-0579b9d1de85","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"点击 "},{"type":"text","marks":[{"type":"bold"}],"text":"「创建新的 API Key」"},{"type":"text","text":",复制保存(只显示一次)"}]}]}]},{"type":"blockquote","attrs":{"id":"d76ae239-4717-44cf-af36-f57573e17b04","textAlign":"inherit","isHoverDragHandle":false},"content":[{"type":"paragraph","attrs":{"id":"6fd3cfcb-8234-4e29-9f9a-9939ada0367c","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"⚠️ 套餐选择:个人开发可选 "},{"type":"text","marks":[{"type":"bold"}],"text":"Builder Plan"},{"type":"text","text":"($20/月),生产环境选 "},{"type":"text","marks":[{"type":"bold"}],"text":"Pay As You Go"},{"type":"text","text":"(按量计费)。"}]}]},{"type":"horizontalRule","attrs":{"id":"c252cdec-58b3-4d93-b36c-2de9c0eaf074","isHoverDragHandle":false}},{"type":"heading","attrs":{"id":"f011b102-cec6-4841-b84f-0c21beb228d3","textAlign":"inherit","indent":0,"level":2,"isHoverDragHandle":false},"content":[{"type":"text","text":"第二步:选择接入协议"}]},{"type":"paragraph","attrs":{"id":"d7cc625c-e461-4845-8b12-312680982ff5","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"ZenMux 支持四种协议,Base URL 不同:"}]},{"type":"table","attrs":{"id":"621a8891-be17-4d02-b070-88c2167757c4","isHoverDragHandle":false},"content":[{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"a7197a64-5650-4d91-a42b-4a87625511b5","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"协议"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"43760542-d012-4ec7-85a8-7df324b27d4e","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"Base URL"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"0b77ad47-b50c-41e8-912f-bb7db40ed688","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"适合场景"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"2d789701-59d6-41ab-bd67-2828ba175819","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"OpenAI Chat Completions"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"8b001cec-1529-4743-8dd5-099a627b0398","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"code"}],"text":"https://zenmux.ai/api/v1"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"bfb35124-7d42-4bb2-9188-892f831af943","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"最通用,推荐"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"7e2b36ff-de33-443b-a5cb-6d154660f708","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"OpenAI Responses"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"6b7191dc-263a-4be8-b2d2-a72856311a21","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"code"}],"text":"https://zenmux.ai/api/v1"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"9fc1c6fc-806a-45e9-a660-10d09fc1aa35","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"OpenAI 新 API"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"3a4574dd-d5fb-42a5-9f67-16b862315de6","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"Anthropic Messages"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"58d8dd56-7f1f-4804-a1c9-6ac6e692ff33","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"code"}],"text":"https://zenmux.ai/api/anthropic"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"53644ac9-d667-4445-ad41-559fda00c875","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"原生 Claude 调用"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"2b6f29ee-97c2-4152-9ad1-c85c1935f1a9","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"Google Gemini"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"5b2f2bf6-58fb-4888-93f2-a5ed581cddbe","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"code"}],"text":"https://zenmux.ai/api/vertex-ai"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"72dc38d3-7618-45e0-bf1d-f3033211bd15","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"原生 Gemini 调用"}]}]}]}]},{"type":"paragraph","attrs":{"id":"0f463c9f-d3a7-4f5c-b069-7a9221a1cfbb","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"本文以 "},{"type":"text","marks":[{"type":"bold"}],"text":"OpenAI 协议"},{"type":"text","text":" 为例,兼容性最好。"}]},{"type":"horizontalRule","attrs":{"id":"efadfacb-8fee-4597-af16-9db563cc8ccb","isHoverDragHandle":false}},{"type":"heading","attrs":{"id":"7605c2ba-ea85-4670-ada5-36cb04f6ab7c","textAlign":"inherit","indent":0,"level":2,"isHoverDragHandle":false},"content":[{"type":"text","text":"第三步:Python 接入代码"}]},{"type":"heading","attrs":{"id":"5fbdbc6c-cc52-4bf6-b3f5-c6f71da7743b","textAlign":"inherit","indent":0,"level":3,"isHoverDragHandle":false},"content":[{"type":"text","text":"安装依赖"}]},{"type":"codeBlock","attrs":{"id":"b0e9c04d-de91-461e-940a-85ed0b9b5f2c","language":"javascript","theme":"atom-one-dark","runtimes":0,"isHoverDragHandle":false,"key":"","languageByAi":"javascript"},"content":[{"type":"text","text":"pip install openai python-dotenvn"}]},{"type":"heading","attrs":{"id":"a755c0a9-6f37-407c-bffa-618905e2af8e","textAlign":"inherit","indent":0,"level":3,"isHoverDragHandle":false},"content":[{"type":"text","text":"配置 .env"}]},{"type":"codeBlock","attrs":{"id":"1fac7a21-a2c8-48e3-bbfd-704ccf20d8a4","language":"javascript","theme":"atom-one-dark","runtimes":0,"isHoverDragHandle":false,"key":"","languageByAi":"javascript"},"content":[{"type":"text","text":"ZENMUX_API_KEY=sk-ai-v1-你的KeynZENMUX_BASE_URL=https://zenmux.ai/api/v1nZENMUX_DEFAULT_MODEL=openai/gpt-4o-minin"}]},{"type":"heading","attrs":{"id":"2509f035-35d8-4f56-85bc-5436fe04d799","textAlign":"inherit","indent":0,"level":3,"isHoverDragHandle":false},"content":[{"type":"text","text":"封装客户端(zenmux_client.py)"}]},{"type":"codeBlock","attrs":{"id":"32cef478-7d03-4f5b-be6b-3e3b460a85de","language":"javascript","theme":"atom-one-dark","runtimes":0,"isHoverDragHandle":false,"key":"","languageByAi":"javascript"},"content":[{"type":"text","text":"import osnfrom openai import OpenAInfrom dotenv import load_dotenvnnload_dotenv()nndef get_client() -> OpenAI:nreturn OpenAI(nbase_url=os.getenv("ZENMUX_BASE_URL", "https://zenmux.ai/api/v1"),napi_key=os.getenv("ZENMUX_API_KEY"),n)nndef chat(prompt: str, model: str = None) -> str:n"""非流式对话"""nclient = get_client()nmodel = model or os.getenv("ZENMUX_DEFAULT_MODEL", "openai/gpt-4o-mini")nresp = client.chat.completions.create(nmodel=model,nmessages=[{"role": "user", "content": prompt}],n)nreturn resp.choices[0].message.content or ""nndef stream_chat(prompt: str, model: str = None):n"""流式对话,逐 token 返回"""nclient = get_client()nmodel = model or os.getenv("ZENMUX_DEFAULT_MODEL", "openai/gpt-4o-mini")nresponse = client.chat.completions.create(nmodel=model,nmessages=[{"role": "user", "content": prompt}],nstream=True,n)nfor chunk in response:n# 流式末尾可能返回空 choices(usage 统计帧),需跳过nif not chunk.choices:ncontinuendelta = chunk.choices[0].delta.contentnif delta:nyield deltan"}]},{"type":"heading","attrs":{"id":"e92fd663-8053-4fea-bf85-ad488ceb4146","textAlign":"inherit","indent":0,"level":3,"isHoverDragHandle":false},"content":[{"type":"text","text":"调用示例"}]},{"type":"codeBlock","attrs":{"id":"d259fe31-77ca-431d-9613-0d8de673a42b","language":"javascript","theme":"atom-one-dark","runtimes":0,"isHoverDragHandle":false,"key":"","languageByAi":"javascript"},"content":[{"type":"text","text":"from zenmux_client import chat, stream_chatnn# 非流式nprint(chat("你好,介绍一下自己"))nprint(chat("讲个笑话", model="anthropic/claude-3.5-sonnet"))nn# 流式nfor token in stream_chat("用一句话介绍 ZenMux"):nprint(token, end="", flush=True)n"}]},{"type":"horizontalRule","attrs":{"id":"97d4c5c0-37fc-4947-8396-592d62ce1c4f","isHoverDragHandle":false}},{"type":"heading","attrs":{"id":"f14bdfeb-7ac7-445f-9f0b-7ce296887b27","textAlign":"inherit","indent":0,"level":2,"isHoverDragHandle":false},"content":[{"type":"text","text":"踩坑记录"}]},{"type":"heading","attrs":{"id":"589f81f2-7a72-42a5-96c0-5a7e2c539dbc","textAlign":"inherit","indent":0,"level":3,"isHoverDragHandle":false},"content":[{"type":"text","text":"坑1:流式调用报 "},{"type":"text","marks":[{"type":"code"}],"text":"list index out of range"}]},{"type":"paragraph","attrs":{"id":"12976569-4e1a-45de-b51a-a4cc27f17e4a","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"原因"},{"type":"text","text":":某些模型在流式末尾会返回一个空的 "},{"type":"text","marks":[{"type":"code"}],"text":"choices"},{"type":"text","text":" 帧(用于返回 usage 统计),直接访问 "},{"type":"text","marks":[{"type":"code"}],"text":"chunk.choices[0]"},{"type":"text","text":" 会越界。"}]},{"type":"paragraph","attrs":{"id":"349c6811-a92f-4ec4-99b0-302e7d6f0843","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"解决"},{"type":"text","text":":遍历 chunk 时先判断 "},{"type":"text","marks":[{"type":"code"}],"text":"if not chunk.choices: continue"}]},{"type":"heading","attrs":{"id":"6c3265a2-241e-4f0a-a056-d9de749ebafa","textAlign":"inherit","indent":0,"level":3,"isHoverDragHandle":false},"content":[{"type":"text","text":"坑2:模型名称格式"}]},{"type":"paragraph","attrs":{"id":"9b0b265d-d556-4ba1-a1ee-17a0412ae6ad","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"ZenMux 的模型名统一为 "},{"type":"text","marks":[{"type":"code"}],"text":"provider/model-name"},{"type":"text","text":" 格式,例如:"}]},{"type":"bulletList","attrs":{"id":"ed4b7291-5425-47fe-95b2-612c3ae92065","isHoverDragHandle":false},"content":[{"type":"listItem","attrs":{"id":"a46c554b-0cf0-483e-9a6d-cc4170403eba"},"content":[{"type":"paragraph","attrs":{"id":"94a1f27c-c38a-4809-986a-4fe3a4816122","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"code"}],"text":"openai/gpt-4o-mini"}]}]},{"type":"listItem","attrs":{"id":"abd7a310-7f35-4959-8187-157e2bd6cb5b"},"content":[{"type":"paragraph","attrs":{"id":"1397910e-66a0-449a-a568-b019053894b5","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"code"}],"text":"anthropic/claude-sonnet-5"}]}]},{"type":"listItem","attrs":{"id":"07fba78c-c9a1-42af-82a6-89d999eb5060"},"content":[{"type":"paragraph","attrs":{"id":"df14e5a9-d8e2-4eaa-8dbd-eeda9dd0236d","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"code"}],"text":"google/gemini-3.1-pro-preview"}]}]},{"type":"listItem","attrs":{"id":"5c1c6e18-ef0c-4150-9291-e381ef16f82d"},"content":[{"type":"paragraph","attrs":{"id":"59a87f3c-1b41-4e2c-8c62-20cf05c99cb8","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"code"}],"text":"bytedance/doubao-seed-2.1-pro"}]}]},{"type":"listItem","attrs":{"id":"d7014011-1c36-4ed1-8919-99995389befd"},"content":[{"type":"paragraph","attrs":{"id":"67142681-03d0-4b3d-b9a1-55b52527da21","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"code"}],"text":"z-ai/glm-5.2"}]}]}]},{"type":"paragraph","attrs":{"id":"472f7fcc-924b-4fcf-9e7e-47284826f077","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"完整模型列表见:"},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://zenmux.ai/models","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"https://zenmux.ai/models"}]},{"type":"heading","attrs":{"id":"af27c2de-0e1f-4b63-afa4-3ddbc0978850","textAlign":"inherit","indent":0,"level":3,"isHoverDragHandle":false},"content":[{"type":"text","text":"坑3:.env 文件不要提交"}]},{"type":"paragraph","attrs":{"id":"94dbdcd1-d35b-4079-b05d-fb3e539fd7aa","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"API Key 是敏感信息,记得在 "},{"type":"text","marks":[{"type":"code"}],"text":".gitignore"},{"type":"text","text":" 中加入:"}]},{"type":"codeBlock","attrs":{"id":"36db20e8-9663-4a6c-82a1-86f296c38ed1","language":"javascript","theme":"atom-one-dark","runtimes":0,"isHoverDragHandle":false,"key":"","languageByAi":"javascript"},"content":[{"type":"text","text":".envn.env.localn"}]},{"type":"horizontalRule","attrs":{"id":"dac19e21-206c-4021-b0f0-9895a04b59ae","isHoverDragHandle":false}},{"type":"heading","attrs":{"id":"a945cf85-4db9-4178-9770-8dcafeaab823","textAlign":"inherit","indent":0,"level":2,"isHoverDragHandle":false},"content":[{"type":"text","text":"效果验证"}]},{"type":"paragraph","attrs":{"id":"2bc16d23-e603-476b-980e-2e6452119e04","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"接入后实际运行结果:"}]},{"type":"codeBlock","attrs":{"id":"042af83e-f447-453c-adce-2f4f90b9dd46","language":"javascript","theme":"atom-one-dark","runtimes":0,"isHoverDragHandle":false,"key":"","languageByAi":"javascript"},"content":[{"type":"text","text":"共 141 个模型可用n非流式对话:正常返回n流式对话:正常返回(已修复空帧 bug)n"}]},{"type":"horizontalRule","attrs":{"id":"1dbbf27f-62ca-4a19-a7f5-b9b52aed9643","isHoverDragHandle":false}},{"type":"heading","attrs":{"id":"ba714cc8-0b36-498a-83a2-8a8f47256be3","textAlign":"inherit","indent":0,"level":2,"isHoverDragHandle":false},"content":[{"type":"text","text":"总结"}]},{"type":"table","attrs":{"id":"7f194810-9660-4fd9-9586-785bc5a5902f","isHoverDragHandle":false},"content":[{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"0adbd472-d8ef-4d99-9fb7-0af60fd962e7","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"方案"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"443106ac-256b-41c3-abcd-2cfbc641b57b","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"消耗"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"38c9babb-16f9-4f32-a883-c17ca1c63764","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"适合场景"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"123b47a1-a7b9-40f3-881d-1109c464743e","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"WorkBuddy 原生调用"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"1a0862ca-84fd-4ffc-ae94-03d1430e453b","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"积分"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"318943b8-e53a-4afe-b27b-dd5c8e53290a","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"快速原型、轻量任务"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"7d4f6cc1-f20a-42e4-9bce-fa03f268cb96","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"ZenMux 自有 Key"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"977a8c69-528f-45e1-aea3-1d837a20eaf6","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"ZenMux 额度"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"2ac7786c-45ba-436a-9415-cf4da6187f7f","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"高频调用、成本控制"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"fde61e95-d36b-499f-8ead-d8ec25409991","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"两者结合"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"9a0a6a80-489a-4aa8-9865-29c6240f9cb2","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"灵活"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"width: 284.6666666666667px"},"content":[{"type":"paragraph","attrs":{"id":"cd315747-9fb2-4d78-8a1c-46c792c3b549","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"日常用 WorkBuddy,重度任务切 ZenMux"}]}]}]}]},{"type":"paragraph","attrs":{"id":"058c997f-9222-451b-b4d3-4fb8fcba0d5b","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"最佳实践"},{"type":"text","text":":把 ZenMux 接入作为 WorkBuddy 积分的补充方案,高频任务走自己的 Key,省钱又灵活。"}]},{"type":"horizontalRule","attrs":{"id":"40f5b166-dd15-4268-87af-783dfe32907a","isHoverDragHandle":false}},{"type":"paragraph","attrs":{"id":"079b2f2c-3d9b-4f66-9be5-c66ffb0e16d2","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"相关链接"}]},{"type":"bulletList","attrs":{"id":"8ccdf6d7-7349-402e-925c-d52521562357","isHoverDragHandle":false},"content":[{"type":"listItem","attrs":{"id":"110525df-4875-4236-bf4f-e703f81dbd51"},"content":[{"type":"paragraph","attrs":{"id":"b120341f-da48-4fcb-82ea-011dd9e601a3","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"ZenMux 官网:"},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://zenmux.ai","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"https://zenmux.ai"}]}]},{"type":"listItem","attrs":{"id":"c3c23f43-fdd6-4ae1-80b4-aec2e439883c"},"content":[{"type":"paragraph","attrs":{"id":"ba149d7a-dc32-440c-a8a3-5b7c2fd8de7e","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"ZenMux 模型列表:"},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://zenmux.ai/models","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"https://zenmux.ai/models"}]}]},{"type":"listItem","attrs":{"id":"57105a24-9fbe-4cf0-a96d-3c80a7ffa62c"},"content":[{"type":"paragraph","attrs":{"id":"63558dab-ec8f-470e-b711-12f7722f7411","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"WorkBuddy 积分说明:"},{"type":"text","marks":[{"type":"link","attrs":{"href":"https://www.codebuddy.cn/docs/workbuddy/Credits","target":"_blank","rel":"noopener noreferrer nofollow","class":null}}],"text":"https://www.codebuddy.cn/docs/workbuddy/Credits"}]}]}]},{"type":"horizontalRule","attrs":{"id":"762d41e9-9a59-4036-b22c-c2684cf66e51","isHoverDragHandle":false}},{"type":"paragraph","attrs":{"id":"cce6664c-6877-4bf4-83a2-4a14c2131f54","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"italic"}],"text":"作者:WorkBuddy 用户 | 发布时间:2026年7月 | 标签:#WorkBuddy #ZenMux #API接入 #AI网关 #Python"}]}]}","createTime":1783299355,"ext":{"closeTextLink":0,"comment_ban":0,"description":"","focusRead":0},"favNum":0,"html":"","isOriginal":0,"likeNum":0,
点击查看更多
推荐专题
热门阅读