feat: configure zai-coding-plan auth via env var + provider pin - #64
Merged
Conversation
Add provider.zai-coding-plan.options.baseURL pin to https://api.z.ai/api/coding/paas/v4 as a workaround for opencode#11106 (endpoint auto-detection may fail without it). Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Add Provider Authentication section to AGENTS.md with credential priority order (env vars > .env > auth.json) and ZHIPU_API_KEY env var table. Clarify that OMO_* flags are subscription toggles, not credentials. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Add Provider Authentication section to configuration.md with credential priority, ZAI Coding Plan subsection documenting ZHIPU_API_KEY, a podman run example, and a note clarifying OMO_* flags are subscription toggles not credentials. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
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.
Summary
Configures
zai-coding-planprovider authentication using environment variables (noopencode auth loginneeded) and pins the base URL as a workaround for opencode#11106.Design decision: Environment variables are sufficient for container auth. OpenCode resolves credentials in priority order: env vars >
.envfile >auth.json. Env vars take precedence overauth.json, need no interactive TTY, and are the recommended path for containers. The entrypoint deliberately does NOT callopencode auth login.Changes
build/etc/opencode/opencode.jsonc— Pinprovider.zai-coding-plan.options.baseURLtohttps://api.z.ai/api/coding/paas/v4(workaround for opencode#11106)AGENTS.md— Add Provider Authentication section with credential priority +ZHIPU_API_KEYtable; clarifyOMO_*flags are subscription toggles, not credentialsdocs/guides/configuration.md— Add user-facing Provider Authentication section withZHIPU_API_KEYdocs, credential priority, andpodman runexampleUsage
ZHIPU_API_KEY— provides the API credential (auth)OMO_ZAI_CODING_PLAN=yes— enables ZAI models in agent fallback chains (subscription toggle)Both are needed for the models to work.
Verification
validate.sh: 35/36 passed, 0 failed (1 pre-existing warning)opencode.jsonvalidated viajqCommits
feat(config): pin zai-coding-plan base URL in opencode.jsoncdocs(agents): document ZHIPU_API_KEY provider authdocs: document ZHIPU_API_KEY for zai-coding-plan authUltraworked with Sisyphus