GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(opencode): resolve opencodeModel "inherit" on all structured-output paths by anagnorisis2peripeteia · Pull Request #195 · tickernelz/opencode-mem

Conversation

@anagnorisis2peripeteia

@anagnorisis2peripeteia anagnorisis2peripeteia commented Jul 27, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Summary

opencodeModel: "inherit" (from #151) only expanded to a concrete model on the auto-capture path. Profile learning, conflict/dedup checks, description evolution, and other generateStructuredOutput callers still sent modelID: "inherit" to OpenCode, which fails with:

ProviderModelNotFoundError: Model not found: local/inherit

(and the same shape for any configured provider).

This expands inherit centrally inside generateStructuredOutput:

  1. Prefer a prompt-recorded model when provided (auto-capture / chat.params)
  2. Else fall back to the most recent entry in OpenCode's model.json for the configured provider
  3. Else throw a clear configuration error instead of a provider lookup failure

Test plan

  • bun test tests/opencode-provider.test.ts (26 pass, including 5 new inherit cases)
  • With "opencodeModel": "inherit" configured, trigger profile learning / auto-capture and confirm no Model not found: <provider>/inherit toasts
  • Confirm capture still prefers the per-prompt recorded model when chat.params has run

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@anagnorisis2peripeteia
fix(opencode): resolve opencodeModel "inherit" on all structured-outp…
8159f12
…ut paths

Auto-capture already expanded "inherit" from the chat.params-recorded
session model. Profile learning, conflict/dedup checks, and other
generateStructuredOutput callers still forwarded modelID="inherit"
literally, producing ProviderModelNotFoundError: Model not found:
local/inherit (and the same for other providers).

Resolve inherit centrally in generateStructuredOutput: prefer a recorded
prompt model, else fall back to OpenCode's recent model.json entry for
the configured provider. Document the behavior and lock it in with tests.
@tickernelz
tickernelz merged commit 1094987 into tickernelz:main Jul 28, 2026
4 of 5 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@tickernelz tickernelz mentioned this pull request Jul 28, 2026
chore: release v2.21.0 #196
Merged
@tickernelz

tickernelz commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Merged into main and included in the v2.21.0 release tag. Verified on the fully integrated batch tree with bun install --frozen-lockfile, bun run typecheck, bun run build, and bun test (268 pass / 0 fail). Thanks for the contribution!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@anagnorisis2peripeteia
anagnorisis2peripeteia deleted the fix/inherit-all-opencode-paths branch September 9, 2026 00:37
@parzival948 parzival948 mentioned this pull request Oct 28, 2026
opencodeModel: inherit fails outside auto-capture because OpenCode v2 no longer writes model.json #453
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@anagnorisis2peripeteia @tickernelz
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.