Repository navigation
Improve GLM 4.x support: China endpoint, custom model IDs, default timeout - #241
Open
zwanski-start wants to merge 1 commit into
Open
zwanski-start wants to merge 1 commit into
zwanski-start wants to merge 1 commit into
Conversation
…ut (AutoForgeAI#10) - Add GLM 4.6 to the GLM model list - Let GLM users edit the base URL (open.bigmodel.cn for mainland China) and enter any GLM model ID (e.g. glm-4.5) - Apply Z.ai's recommended API_TIMEOUT_MS=3000000 by default for GLM - Document GLM setup in README and .env.example; add tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🔍 QA report: ✅ PassedTester: Ada (cubefarm agent, in a fresh session) · Round: 1 · Author: Ken The PR closes the GLM 4.x gaps from issue #10. In the UI you can now change the GLM Base URL (China endpoint) and enter any GLM model ID, glm-4.6 is listed, and GLM gets API_TIMEOUT_MS=3000000 by default, which an explicit setting overrides. I verified this end to end: UI changes saved through PATCH /api/settings, and get_effective_sdk_env() produced the China URL, the custom model on all tiers and the timeout. New and related tests, ruff, the UI build and lint are clean, and the pytest/mypy failures are identical on master.
🧪 Commands run
No browser screenshots were taken in this round. Posted by cubefarm · merges automatically once GitHub's checks pass |
cabana8471-arch
pushed a commit
to cabana8471-arch/autoforge
that referenced
this pull request
Nov 8, 2026
…t, long timeout) Adaptations: none (CLAUDE.md test list merged with my-features' entries). Integrates AutoForgeAI#241 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeH26pcsqoxPb3CDs8g1VN
cabana8471-arch
pushed a commit
to cabana8471-arch/autoforge
that referenced
this pull request
Nov 8, 2026
Adaptations: manual merge with AutoForgeAI#241 — test_api_providers.py keeps both the GLM tests and the Gemini tests; the Settings base-URL / custom-model fields show for GLM and Gemini. Integrates AutoForgeAI#272 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeH26pcsqoxPb3CDs8g1VN
cabana8471-arch
pushed a commit
to cabana8471-arch/autoforge
that referenced
this pull request
Nov 8, 2026
… keys and URLs Adaptations: - manual merge with AutoForgeAI#241/AutoForgeAI#272 (provider lists, test file, Settings texts); - the Base URL field now shows for Moonshot too (its help text asks China users to change the URL, which the UI did not allow); - a provider switch also clears the saved auth token: base URL and token are global settings shared by every provider, so the previous provider's secret key was sent to the new provider's server (and the UI showed it as set). test_settings_provider_switch covers the router. Integrates AutoForgeAI#308 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeH26pcsqoxPb3CDs8g1VN
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.
Closes #10
Context
GLM was already available as a provider, but several gaps made GLM 4.x hard to use in practice:
api.z.ai, yet the UI hint pointed users toopen.bigmodel.cn. Mainland-China keys needhttps://open.bigmodel.cn/api/anthropic, and there was no way to set it.glm-4.5).API_TIMEOUT_MS=3000000for long planning turns, which is the failure mode the issue describes.Changes
registry.py: addedglm-4.6to the GLM models. Addeddefault_timeout_ms: "3000000"to the GLM provider.get_effective_sdk_env()now uses the provider's default timeout when the user hasn't setapi_timeout_ms.SettingsModal.tsx/SettingsView.tsx: GLM now shows the editable Base URL field (pre-filled with the z.ai default) and the custom model ID input. The hint text explains both endpoints..env.example: step-by-step GLM setup, the China endpoint, andAPI_TIMEOUT_MS.test_api_providers.py(5 tests) for the GLM env (defaults, custom model + China URL, timeout override, no default timeout for other providers). Listed in CLAUDE.md.Verification
pytest test_api_providers.py test_client.py: 26 passed.python test_security.py: all passed.ruff check .is clean, andmypyon the changed files is clean.ui:npm run lintgives 0 errors (the 6 warnings were already there).npm run buildsucceeds.PATCH /api/settings, and checked Settings with Playwright. The Base URL showshttps://api.z.ai/api/anthropicwith a Change button, the models are GLM 5 / 4.7 / 4.6 / 4.5 Air, and the custom model input is shown.Assumptions
zwanski-start/autoforge) because the bot account only has read access to the upstream repo.🤖 Generated with Claude Code