Skip to content

feat(skillgen): run the Harness on GLM 5.3 through OpenCode Go - #529

Merged
harlan-zw merged 1 commit into
mainfrom
feat/skillgen-glm-5-3
Oct 7, 2026
Merged

harlan-zw merged 1 commit into
mainfrom
feat/skillgen-glm-5-3

Conversation

@harlan-zw

Copy link
Copy Markdown
Collaborator

🔗 Linked issue

Related to #528

❓ Type of change

  • 📖 Documentation
  • 🐞 Bug fix
  • 👌 Enhancement
  • ✨ New feature
  • 🧹 Chore
  • ⚠️ Breaking change

📚 Description

Skillgen should run OpenCode on GLM 5.3 instead of Claude Sonnet. The Worker gateway only proxied Anthropic and Google, so the container could not reach OpenCode Go. The gateway now routes opencode-go to https://opencode.ai/zen/go/v1/chat/completions with the Worker's key. It forces the model, caps output at 8,192 tokens, allows only function tools, and counts each call against the job limit. wrangler.jsonc makes opencode-go/glm-5.3 the default. The Anthropic and Google paths are unchanged.

The pinned OpenCode bootstrap (opencode-ai 1.18.31) already resolves opencode-go/glm-5.3 with model fetching disabled, so the runner needs no change.

📝 Migration

Set the secret before this merges. A merge deploys the Worker, and without the key every Skillgen job fails.

  1. cd workers/skill-harness && pnpm exec wrangler secret put OPENCODE_API_KEY
  2. Merge, or deploy by hand: gh workflow run deploy-cloudflare.yml --ref feat/skillgen-glm-5-3 --field target=harness-proof
  3. Run one proof as docs/runbooks/skill-harness-proof.md describes, and check the model call count and review findings.

🤖 AI disclosure: Harlan Agent Kit modified this description. My AI open-source policy.

Skillgen runs up to 96 model calls per job. GLM 5.3 on OpenCode Go
lists at $1.40 per million input tokens and $4.40 per million output
tokens, well under Sonnet 4.6, so each run costs less.

The gateway gains an opencode-go route with the same guarantees as the
Anthropic and Google routes: Worker-held credential, forced model,
8,192 output token cap, hosted execution blocked, and the job call
limit. Extra choices and service tiers are removed because both raise
the price.

The pinned OpenCode 1.18.31 bootstrap lists opencode-go/glm-5.3 from
its bundled snapshot with model fetches disabled and no network, so the
runner needs no explicit provider declaration.
@harlan-zw harlan-zw added the harlan-agent-review Pull request triage requires an adversarial Review. Adding this label manually always forces one. label Oct 7, 2026
@harlan-github-agent harlan-github-agent Bot added harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. and removed harlan-agent-review Pull request triage requires an adversarial Review. Adding this label manually always forces one. labels Oct 7, 2026
@harlan-zw
harlan-zw merged commit 8c8116a into main Oct 7, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant