Skip to content

feat: configure zai-coding-plan auth via env var + provider pin - #64

Merged
tankdonut merged 3 commits into
mainfrom
feat/zai-coding-plan-auth
Jul 29, 2026
Merged

feat: configure zai-coding-plan auth via env var + provider pin#64
tankdonut merged 3 commits into
mainfrom
feat/zai-coding-plan-auth

Conversation

@tankdonut

Copy link
Copy Markdown
Owner

Summary

Configures zai-coding-plan provider authentication using environment variables (no opencode auth login needed) 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 > .env file > auth.json. Env vars take precedence over auth.json, need no interactive TTY, and are the recommended path for containers. The entrypoint deliberately does NOT call opencode auth login.

Changes

  • build/etc/opencode/opencode.jsonc — Pin provider.zai-coding-plan.options.baseURL to https://api.z.ai/api/coding/paas/v4 (workaround for opencode#11106)
  • AGENTS.md — Add Provider Authentication section with credential priority + ZHIPU_API_KEY table; clarify OMO_* flags are subscription toggles, not credentials
  • docs/guides/configuration.md — Add user-facing Provider Authentication section with ZHIPU_API_KEY docs, credential priority, and podman run example

Usage

podman run -it --rm \
  -e ZHIPU_API_KEY=your-key-here \
  -e OMO_ZAI_CODING_PLAN=yes \
  opencoder
  • 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)
  • JSONC parsed clean — provider config intact with correct URL
  • opencode.json validated via jq

Commits

  1. feat(config): pin zai-coding-plan base URL in opencode.jsonc
  2. docs(agents): document ZHIPU_API_KEY provider auth
  3. docs: document ZHIPU_API_KEY for zai-coding-plan auth

Ultraworked with Sisyphus

tankdonut and others added 3 commits July 29, 2026 03:33
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>
@tankdonut tankdonut self-assigned this Jul 29, 2026
@tankdonut
tankdonut merged commit 175c1b7 into main Jul 29, 2026
3 checks passed
@tankdonut
tankdonut deleted the feat/zai-coding-plan-auth branch July 29, 2026 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant