Repository navigation
Add shared provider routing and Z.AI host-model profiles - #494
Merged
Merged
Conversation
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.
Provider profiles currently require service-specific branches throughout harness adapters, host models, and editors. This adds direct Z.AI profiles and independent host-model bindings behind shared built-in provider definitions, so those consumers receive protocol bindings and safe configuration descriptors.
z-ai/namespaced IDs on OpenRouter.hostModelProfilesindependently binds agent, policy, prefilter, summary, and autoApprove roles. Builtin budget enforcement uses the effective host model, including session overrides, while SDK creation retains the original request so maps apply once. Auto-approval remains disabled by default. Z.AI JSON-mode structured output retains SDK validation and human escalation on invalid output.Validation includes 576 focused core tests, 86 UI tests, 18 hermetic TLS proxy tests, and an installed Claude Code turn against a dummy local upstream. Final infrastructure/credential changes additionally passed 150 focused tests. The final prompt/Goose corrections passed 188 focused tests and 19 hermetic TLS tests, with three read-only simplify reviews clear. A full-branch simplify pass additionally covered all 70 files and found one builtin budget identity mismatch, now corrected and re-reviewed; 208 focused caller/model/budget tests passed for that fix. TypeScript, source/UI lint, formatting, cycle checks, production build, and commit/push hooks are checked. A test-only compatible definition exercises all three harness generators, host credential resolution, and the fixed CLI/web editors; persisted configuration still rejects custom provider types and endpoints.
The OpenRouter Codex catalog uses its emitted startup wire identity with selected-model metadata, otherwise conservative 200k/text-only capabilities. This applies to emitted entries: uncataloged command override IDs retain pinned Codex's own 272k/text+image unknown-model fallback, as before this refactor. Direct Z.AI retains the qualified GLM 5.3 catalog entry; Flash context/multimodal behavior remains unqualified. Goose compatibility does not reconstruct metadata omitted by error/frontend tool formatting or repair the pinned streaming parser's pre-existing metadata loss; effective-auxiliary cache formatting is qualified separately from literal SDK parity in the design document.
Earlier user-authorized Coding Plan hello-world checks returned
HELLO_FROM_ZAIfor all three harnesses using GLM 5.3. Claude Code and Goose observed served GLM 5.3/HTTP 200; Codex completed but its served identity remains unverified because capture ended with one aborted exchange and no final record. Flash, standard API-plan access, full tool loops, host-role live calls, cache/context behavior, and benchmark completion are not qualified by those short checks. Seedocs/designs/zai-provider-profiles.mdfor architecture and qualification details.User-defined compatible providers/endpoints and workflow benchmark changes are deferred.