Skip to content
Source
Sign inSign up
TanStack/schemas

Read OpenCode Go routes from the models list api field #682

Mergedtombeckenhammerged 1 commit intomain fromrefs/pull/682/headmerged by tombeckenham View on GitHub

tombeckenhamcommented

Fixes #679

Summary

  • The daily opencode-go spec sync read endpoint paths from the ## Endpoints table in console/go.mdx. That table is gone, so every run threw documents no endpoint paths and left the Go document at its last good state.
  • Go routes now come from each GET /inference/go/v1/models row: api.<protocol>.base_url plus that protocol's path (chat-completions, responses, messages, generate-content). A listed id with no api entry, or an unknown protocol key, throws.
  • Cost, limits, and capabilities on the same rows stay unread. Zen still uses documentedRoutes on its Endpoints table. Google method binding stays on the existing probe records.

Test plan

  • pnpm exec vitest run src/server/providers/opencode-routes.test.ts src/server/providers/opencode-go-facts.test.ts src/server/providers/adapters/opencode-go.test.ts src/server/providers/adapters/opencode.test.ts src/server/providers/opencode-catalog.test.ts
  • After deploy, POST /v1/admin/sync/opencode-go completes without documents no endpoint paths
    1. ⚠️ No Changeset found

      Latest commit: d029aab3dbb5cff691f51604190b0bc4e605e402

      Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

      This PR includes no changesets

      When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

      Click here to learn what changesets are, and how to add one.

      Click here if you're a maintainer who wants to add a changeset to this PR

    2. Warning

      Review limit reached

      You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

      Next included review available in 49 minutes.

      Check out review usage here.

      View limit details

      Limit details: You’ve used the included review currently available.

      Learn how review limits work.

      Review configuration:

      Run configuration

      • Source mode: Auto
      • Repository: Unavailable
      • Branch: Unavailable
      • File: No configuration file from this repository applied
      • Commit: Unavailable
      • Layers: defaults
      • Review profile: CHILL
      • Plan: Advanced
      • Run ID: 0692dc18-61a1-4b2f-a923-0336a36240e7
      Commits

      Reviewing files that changed from the base of the PR and between 9153af1d1513119dbad447dc1378b5603d729782 and d029aab3dbb5cff691f51604190b0bc4e605e402.

      Files selected for processing: 7

      • src/server/providers/adapters/opencode-go.test.ts
      • src/server/providers/adapters/opencode-go.ts
      • src/server/providers/opencode-catalog.ts
      • src/server/providers/opencode-go-facts.test.ts
      • src/server/providers/opencode-go-facts.ts
      • src/server/providers/opencode-routes.test.ts
      • src/server/providers/opencode-routes.ts
      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      Share

    3. tombeckenham linked this to fix #679

    4. tombeckenham merged this13ad6f7

    5. tombeckenham closed this

Sign in to join this conversation.