feat(zai): add China Coding Plan provider and fix endpoint priority - #11429
Closed
afanty2021 wants to merge 16 commits into
Closed
feat(zai): add China Coding Plan provider and fix endpoint priority#11429afanty2021 wants to merge 16 commits into
afanty2021 wants to merge 16 commits into
Conversation
- Created complete AI context documentation system with 9 module docs - Added 8 architecture decision records (ADRs) with Mermaid diagrams - Implemented module interaction flowcharts in root CLAUDE.md - Established ADR feedback mechanism with voting and discussion process - Added ADR navigation mindmap and changelog - Achieved 100% module documentation coverage (9/9 modules) Module docs: - agent: Core agent logic (prompt builder, context compressor, memory manager) - hermes_cli: CLI interface (command registry, config system, setup wizard) - tools: Tool system (registry, execution, scheduling) - gateway: Message platform gateway (platform adapters, session management) - environments: RL training environments (agent loop, benchmarks) - cron: Cron scheduler (job scheduling, persistence) - acp_adapter: ACP protocol adapter (IDE integration) - plugins: Plugin system (memory providers, extensibility) - tests: Test suite (unit, integration, E2E, benchmarks) Architecture Decision Records: - ADR-001: Synchronous agent loop - ADR-002: Centralized tool registry - ADR-003: Multi-instance configuration isolation - ADR-004: Prompt cache protection - ADR-005: Memory provider plugin system - ADR-006: Command system design - ADR-007: Session management system - ADR-008: Skill system architecture Documentation features: - 15 Mermaid diagrams (flowcharts, sequence diagrams, state diagrams, mindmaps) - Breadcrumb navigation in all module docs - Cross-references between modules and ADRs - Complete ADR feedback mechanism with voting - ADR changelog tracking architecture evolution Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…文本批处理、OAuth 令牌同步\n- 新功能:/fast 命令、Codex 快速模式\n- 文档与测试:流式超时文档、文本批处理测试
- 更新根级 CLAUDE.md:添加 Web UI Dashboard 文档,更新技术栈(React 19、Vite、Tailwind CSS v4) - 完善 gateway 模块文档:添加 Web 服务器、企业微信平台调试日志 - 完善 hermes_cli 模块文档:添加 Web 服务器、模型配置更新 - 添加 glm-4.5-air 模型支持 - 添加 MEMORY/ 目录到 .gitignore - 合并上游 v0.9.0 版本(195 个文件更改,+6,834/-2,896 行) 上游主要更新: - Web UI 移动端响应式支持 - 自定义提供商多模型去重和分组 - 配置系统改进和死代码清理 - Slack 权限修复和贡献者审计脚本 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
`_get_named_custom_provider("ollama")` called `resolve_provider("ollama")`
which aliased "ollama" → "custom" and returned without raising AuthError.
This caused the function to skip the custom_providers lookup and return None,
so fallback to local Ollama silently failed with "provider not configured".
Now when resolve_provider maps to "custom", we fall through to the named
custom provider lookup instead of short-circuiting.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update AI context documentation with latest upstream changes: - Add backup/import system and quick snapshot functionality - Add OAuth provider management for Web Dashboard - Add Kimi/Moonshot provider support for China users - Add debug commands (/debug, hermes debug share) - Add session tips feature (279 tips total) - Add native model picker modal (/model) - Add network configuration options (network.force_ipv4) - Add component-based logging system - Add new modules: credential_pool, context_engine, backup, auth_commands - Update core commands and slash commands documentation - Add v2026.4.13 changelog entry Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 新增 zai-coding-cn provider 支持 China Coding Plan 端点 - 调整 ZAI 端点检测顺序,优先使用 Coding Plan 端点 - 修复 base_url 解析优先级:配置文件 > 自动检测 > 环境变量 - 添加模型别名:glm-cn, zai-cn, zhipu-cn - 新增 clear_zai_cache.py 工具脚本 修复问题:自动检测可能选择错误端点导致额外扣费 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 功能概述
为 ZAI (智谱AI) 添加 China Coding Plan 端点支持,并修复端点优先级问题。
🎯 动机
中国用户的 ZAI API key 分为普通端点和 Coding Plan 端点两个独立计费项:
当前问题:
base_url设置被自动检测覆盖✨ 改进内容
1. 新增
zai-coding-cnProviderhttps://open.bigmodel.cn/api/coding/paas/v4glm-cn,zai-cn,zhipu-cn2. 优化端点检测顺序
优先尝试 Coding Plan 端点,为中国用户提供更经济的选项。
3. 修复 base_url 解析优先级
配置文件中的
base_url设置现在会被正确识别,不会被自动检测覆盖。4. 新增缓存清理工具
scripts/clear_zai_cache.py- 清理auth.json中的端点缓存📝 修改文件
.env.examplehermes_cli/auth.pyhermes_cli/main.pyhermes_cli/models.pyhermes_cli/providers.pyhermes_cli/runtime_provider.pyscripts/clear_zai_cache.py🧪 测试
已验证:
📚 相关问题
解决中国用户在使用 ZAI Coding Plan API key 时遇到的额外扣费问题。
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com