Skip to content

farm: built-in default API base URL is stale (api.opencode.ai/v1 → 404) #90

Closed

Description

@SUaDtL

Found during the docs-site-mvp /ca:sprint --farm run (2026-06-18, Windows).

ENV.defaultApiBaseUrl in plugins/ca/tools/farm.ts is https://api.opencode.ai/v1. That host/path now returns HTTP 200 with body Not Found for both /models and /chat/completions, so every worker fails with non-JSON response: ... "Not Found" is not valid JSON.

The live OpenCode Zen OpenAI-compatible endpoint is https://opencode.ai/zen/v1 (verified: /models and /chat/completions both 200, models owned_by: "opencode").

Workaround used: set FARM_API_BASE_URL=https://opencode.ai/zen/v1 and plan.meta.apiBaseUrl.

Perma-fix candidates:

  • Update defaultApiBaseUrl to https://opencode.ai/zen/v1.
  • Treat a non-JSON / Not Found body as an endpoint-config error with a clear message ("check FARM_API_BASE_URL"), not an opaque worker error.
  • Update includes/farm.md (it documents the old default).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfeature-forgePreview-feature feedback (Feature Forge)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions