Skip to content

Bind OpenCode Go Gemini routes from the live models list and delete the probe records - #795

Merged
tombeckenham merged 1 commit into
mainfrom
748-replace-the-hand-written-opencode-go-route-records-with-an-o
Dec 4, 2026
Merged

tombeckenham merged 1 commit into
mainfrom
748-replace-the-hand-written-opencode-go-route-records-with-an-o

Conversation

@tombeckenham

@tombeckenham tombeckenham commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

What

The issue offered two ways out: observe the routes from the Worker, or find an OpenCode source that states them. The second one exists, so no key or route probe is added.

  • GET https://opencode.ai/inference/go/v1/models states api.generate-content.base_url for gemini-4-argon. goListingRoutes already reads that as models/<id>:generateContent (opencode-go spec sync: Go docs no longer list endpoint paths; read routes from the listing's api field #679), so the Go special case in opencode-catalog.ts that bound only a probe record is removed. gemini-4-argon now binds inference/go/google/v1beta/models/gemini-4-argon:generateContent (it was unbound before).
  • gemini-4-argon-contributor, the only id the records covered, is gone from the Go list and deprecated on models.dev (checked 2026-12-04). Its two routes leave the spec.
  • openCodeRouteSpec now skips a models.dev row whose id the Go list no longer names. Without this the contributor row's per-model route would fail the spec sync with "states no route".
  • trainsOnRequestData comes only from go.training on the list. The read-time probe fill is removed.

Deleted

probes/opencode-go.ts, probes/compare.ts, ProbeRecord/ProbeRequest/ProbeExpect, probedRoute, probeFactSource, probesFor, staleRouteRecordCount, probeOperation, the opencode-go mode of pnpm run probe, and OPENCODE_GO_API_KEY from ProviderSecrets.

Not done

  • :streamGenerateContent is not bound for any id: no OpenCode source states it.
  • No MODEL_ROW_SHAPE bump: only descriptions changed, and the hash ignores them.

Checked

  • pnpm run test (265 files, 2764 tests), typecheck, lint, check pass.
  • The adapter run against the live list and models.dev: spec paths are messages, chat/completions, responses and the gemini-4-argon:generateContent route; gemini-4-argon binds it with a listing source.

After merge

The next spec sync removes the two contributor endpoints from opencode-go. docs/api-changes.md has the note.

Fixes #747

Summary by CodeRabbit

  • Changes
    • OpenCode Go routes now reflect its live model list; routes for models absent from that list are no longer included.
    • Training-on-request-data information is shown only when stated by the model’s own source.
    • Probe status now reflects the age of verified model facts, rather than hand-written route records.
  • Documentation
    • Updated API descriptions and guides to clarify route availability, data sourcing, and probe verification.

…he probe records (#748)

The Go models list now states api.generate-content.base_url for
gemini-4-argon, and no longer lists gemini-4-argon-contributor (models.dev
marks it deprecated). The hand-written route records are deleted with the
code that only they used. The spec sync drops a models.dev id the Go list
no longer names. trainsOnRequestData comes only from go.training.
@changeset-bot

changeset-bot Bot commented Dec 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c844eda

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@modelschemas/client Patch
modelschemas Patch
@modelschemas/codegen Patch
@modelschemas/rate-card Patch
@modelschemas/vite Patch

Not sure what this means? Click here to learn what changesets are.

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

@coderabbitai

coderabbitai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The PR removes OpenCode Go’s hand-written route probe records and uses IDs in the live models list to constrain generated routes. It removes probe-based training-data fallbacks and updates stale-probe reporting to count served probe facts.

Changes: OpenCode Go listing and probe changes

Layer / File(s) Summary
Bind routes to the live models list
src/server/providers/opencode-go-facts.ts, src/server/providers/opencode-routes.ts, src/server/providers/opencode-catalog.ts, src/server/providers/adapters/opencode-go.test.ts, src/server/providers/opencode-routes.test.ts, CLAUDE.md, docs/api-changes.md, .changeset/opencode-go-listing-routes.md
goListedIds extracts IDs from the Go models-list response. openCodeRouteSpec filters chat rows against those IDs, and catalog route provenance uses listing-derived data. Tests and documentation describe the listed gemini-4-argon route and exclude the unlisted contributor model.
Use model-listed training facts
src/server/catalog.ts, src/server/providers/opencode-go-facts.ts, src/server/providers/opencode-go-facts.test.ts, src/server/openapi.ts, src/server/providers/types.ts, src/server/skill.ts, README.md, openapi.json, skill/modelschemas/SKILL.md
OpenCode Go training-data status no longer falls back to a probe record. The API returns true only when the model row stores true; otherwise, it returns null. Related descriptions identify the model’s own source as the basis for the value.
Remove route-record probe support
scripts/probe.ts, src/server/providers/probes/*, src/server/status.ts, src/server/llms-txt.ts, src/server/providers/types.ts, openapi.json, skill/modelschemas/SKILL.md
The OpenCode Go probe records, route-record command path, and route-record helper functions are removed. Stale-probe status now counts served stale facts, and related descriptions refer to probed facts rather than route records.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Refactor

Sequence Diagram(s)

sequenceDiagram
  participant openCodeRouteSpec
  participant GoModelsList
  participant goListedIds
  participant RouteRows
  openCodeRouteSpec->>GoModelsList: Fetch the route source
  GoModelsList-->>openCodeRouteSpec: Return models-list JSON
  openCodeRouteSpec->>goListedIds: Extract IDs from the data array
  goListedIds-->>openCodeRouteSpec: Return listed IDs
  openCodeRouteSpec->>RouteRows: Retain chat rows with listed rawId values
  RouteRows-->>openCodeRouteSpec: Return filtered rows
  openCodeRouteSpec->>openCodeRouteSpec: Validate documented route patterns
Loading

Possibly related issues

  • Issue 716 proposes extending probe files and binding endpoints from probe records. This PR removes the probe types and helpers that issue would extend.
  • Issue 717 proposes widening ProbeRecord and adding a generic probe. This PR removes ProbeRecord and its related helpers.

Possibly related PRs

  • TanStack/schemas#676: Both PRs use the OpenCode Go go.training field as the source for trainsOnRequestData.
  • TanStack/schemas#704: Both PRs affect how the gemini-4-argon listing entry maps to a generated route.
  • TanStack/schemas#741: That PR retained the legacy OpenCode Go route records; this PR removes them.
Merge Risk: Minimal · up to c844e · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the two main changes: binding OpenCode Go Gemini routes from the live models list, and deleting the probe records. The raw summary confirms both. The removed probe records are the hand…
Linked Issues check Passed [#747] Acceptance criterion: no file under src/server/providers/probes/ holds a typed record. The PR deletes probes/opencode-go.ts, which held the two ProbeRecord entries for gemini-4-argon-contributo…
Out of Scope Changes check Passed The changes follow from removing the hand-written probe records. Each has a stated connection to #747. Deleted probe code and types (probes/opencode-go.ts, probes/compare.ts, ProbeRecord/ProbeRequest/…
Full details: Title check

Explanation

The title names the two main changes: binding OpenCode Go Gemini routes from the live models list, and deleting the probe records. The raw summary confirms both. The removed probe records are the hand-written OpenCode Go route records, and gemini-4-argon is bound from the live Go list. The title is specific and matches the objectives.

Full details: Linked Issues check

Explanation

[#747] Acceptance criterion: no file under src/server/providers/probes/ holds a typed record. The PR deletes probes/opencode-go.ts, which held the two ProbeRecord entries for gemini-4-argon-contributor. It removes ProbeRecord, ProbeRequest, and ProbeExpect from probes/types.ts and the probeRecords export from probes/index.ts. It also removes observationMatches from probes/compare.ts. probes/probes.test.ts keeps only a probeIsStale date test, which holds no record. The issue allows an OpenCode source instead of a Worker probe. The PR uses the live Go models list (https://opencode.ai/inference/go/v1/models), which states api.generate-content.base_url for gemini-4-argon. goListingRoutes reads that as models/gemini-4-argon:generateContent, and the opencode-go adapter test covers this binding. The contributor id is absent from the list, so its routes are removed and trainsOnRequestData now comes only from go.training. Not bound: :streamGenerateContent, because the PR states that no OpenCode source states it. The issue's acceptance criterion does not require that route. packages/client/src/generated/types.gen.ts is excluded by ignored_files. This assessment does not depend on it. Basis: the PR summary and the listed hunks. The raw source of the probes directory was not read directly, so the absence of other records there relies on the summary.

Full details: Out of Scope Changes check

Explanation

The changes follow from removing the hand-written probe records. Each has a stated connection to #747. Deleted probe code and types (probes/opencode-go.ts, probes/compare.ts, ProbeRecord/ProbeRequest/ProbeExpect, probedRoute, probeFactSource, probesFor, staleRouteRecordCount, probeOperation) support the acceptance criterion. Removing the opencode-go mode of scripts/probe.ts and OPENCODE_GO_API_KEY from ProviderSecrets follows from dropping the Worker probe path. Edits to catalog.ts, opencode-go-facts.ts, opencode-routes.ts, opencode-catalog.ts, status.ts, and openapi.ts update code and descriptions that read the removed records. The skip of models.dev rows absent from the Go list is stated in the PR description. It is needed so the removed contributor row does not fail the spec sync. The changeset, CLAUDE.md, README, SKILL.md, llms-txt.ts, skill.ts, and docs/api-changes.md update descriptions that referred to probe records. The PR does not add new features or unrelated behavior in the summary. No change was found that is unrelated to #747.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • 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

Recent review info

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: 37bf475a-58c4-4ce7-83b2-0f8b22a6ce99
Commits

Reviewing files that changed from the base of the PR and between 1836853 and c844eda.

Files ignored due to path filters: 1

  • packages/client/src/generated/types.gen.ts is excluded by !**/generated/**
Files selected for processing: 24

  • .changeset/opencode-go-listing-routes.md
  • CLAUDE.md
  • README.md
  • docs/api-changes.md
  • openapi.json
  • scripts/probe.ts
  • skill/modelschemas/SKILL.md
  • src/server/catalog.ts
  • src/server/llms-txt.ts
  • src/server/openapi.ts
  • src/server/providers/adapters/opencode-go.test.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
  • src/server/providers/probes/compare.ts
  • src/server/providers/probes/index.ts
  • src/server/providers/probes/opencode-go.ts
  • src/server/providers/probes/probes.test.ts
  • src/server/providers/probes/types.ts
  • src/server/providers/types.ts
  • src/server/skill.ts
  • src/server/status.ts
Files with no reviewable changes: 3

  • src/server/providers/probes/compare.ts
  • src/server/providers/probes/opencode-go.ts
  • src/server/providers/probes/types.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@tombeckenham
tombeckenham merged commit 69375ee into main Dec 4, 2026
5 checks passed
tombeckenham added a commit that referenced this pull request Dec 4, 2026
…795)

* Price OpenAI's long-context tier when the page states it as amounts (#750)
* Merge remote-tracking branch 'origin/main' into 750-openai-gpt-6-cyber-has-no-price-its-long-context-bullet-leav
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.

Replace the hand-written opencode-go route records with an observed or docs-read source

1 participant