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(provider): respect configured small_model and add opencode handling to smallOptions by lexlian · Pull Request #31092 · anomalyco/opencode

Conversation

@lexlian

@lexlian lexlian commented Jun 6, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

Issue for this PR

Closes #31042

Type of change

  • Bug fix

What does this PR do?

Two bugs cause the symptoms in #31042:

Bug 1 — silent fallback in getSmallModel. When small_model is configured but the model isn't in the provider catalog, the function returns undefined and the title agent silently uses the main model. The fallback behavior is correct (per the documented design and the changelog: "Invalid small_model config no longer poisons fallback paths"), but the user has no way to know their config was ignored. The fix adds a WARN log inside the catchTag handler so users see why.

Bug 2 — smallOptions missing opencode handling. When the title agent calls the LLM with small: true for an opencode provider model, smallOptions returned {} because it only handled openai, openrouter/llmgateway, and venice. The opencode API call was missing the include and reasoningSummary options that options() already sets for opencode, so the request would fail/behave unexpectedly, and the LLM runtime would retry — that's the ~90s delay users reported. The fix adds the same opencode options to smallOptions, scoped to the small-model call path.

Related: #8609 (misleading docs), #14807 (silent failure), #30662 (smallOptions missing opencode).

How did you verify your code works?

cd packages/opencode
bun typecheck                                          # passes
bun test ./test/provider/provider.test.ts              # 88/88 pass
bun test ./test/provider/transform.test.ts             # 250/250 pass (was 248, +2 new for opencode)
bun test ./test/session/prompt.test.ts -t "loop calls LLM"  # passes

To verify the warning manually: set small_model: "opencode/some-invalid-model" in your config, start a session, and you should see a WARN line configured small_model not found, falling back to main model in the logs.

Screenshots / recordings

N/A — no UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sorry, something went wrong.

Uh oh!

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

beenotung reacted with thumbs up emoji beenotung reacted with heart emoji
All reactions
  • 👍 1 reaction
  • ❤️ 1 reaction
@lexlian
fix(provider): respect configured small_model and add opencode handli…
61f50f2
…ng to smallOptions

Closes anomalyco#31042

Two compounding bugs caused the symptoms in anomalyco#31042:

1. When cfg.small_model is configured but the model is not in the
   provider catalog, getSmallModel silently returned undefined and
   the caller fell back to the main model with no indication to the
   user. Added a warning log so users know their config was ignored.
   The fallback behavior itself matches the documented design
   (per anomalyco#14807 and the changelog: "Invalid small_model config no
   longer poisons fallback paths").

2. smallOptions() in transform.ts was missing opencode provider
   handling — only openai, openrouter/llmgateway, and venice were
   handled. For opencode models it returned an empty options object,
   causing the opencode API call to fail/behave unexpectedly and
   trigger LLM retries (the 90s delay users reported). Added the
   same include and reasoningSummary that options() already sets for
   opencode models, scoped to the small-model call path.
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Jun 6, 2026
@lexlian lexlian mentioned this pull request Jun 6, 2026
small_model ignored for title agent + FreeUsageLimitError retry loop blocks session for ~90s #31042
Closed
@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Jun 6, 2026
@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions github-actions Bot mentioned this pull request Jun 10, 2026
fix(provider): add opencode provider support in smallOptions() #31760
Closed
3 of 6 tasks
@beenotung

beenotung commented Jun 11, 2026

Copy link
Copy Markdown

This PR will also fix issue #30662 (Auto session title generation fails for opencode provider models). The root cause is the same - smallOptions() missing opencode provider handling.

All reactions

Sorry, something went wrong.

Uh oh!

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

@beenotung beenotung mentioned this pull request Jun 11, 2026
Auto session title generation fails for opencode provider models (smallOptions missing provider config) #30662
Closed
@Jackdrakes

Jackdrakes commented Jul 5, 2026

Copy link
Copy Markdown

Hi maintainers! Could someone please review and approve the workflow for this PR? It's been waiting for about three weeks now, and we're looking forward to having this feature available. Thanks for your time and all your work on the project!

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions github-actions Bot mentioned this pull request Jul 5, 2026
fix(opencode): stop silent session title generation failures #35440
Closed
3 tasks done
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions github-actions Bot closed this Jul 6, 2026
@github-actions github-actions Bot added the automated-pr-cleanup label Jul 6, 2026
@beenotung

beenotung commented Aug 22, 2026

Copy link
Copy Markdown

Requesting this PR be reopened. It was auto-closed by the cleanup bot (created >1 month ago, <2 positive reactions), but it fixes a real, still-active bug — it should not have been swept up.

The bug is still present in the latest release (v1.18.19): auto session title generation silently fails for opencode (Zen) provider models, because smallOptions() in src/provider/transform.ts still has no opencode branch (it only handles openai, openrouter/llmgateway, and venice). Issue #30662 is open and multiple users are affected.

This PR is the proper fix: it adds the missing opencode handling to smallOptions() (the same promptCacheKey/include/reasoningSummary that options() already sets), plus a useful warning when a configured small_model isn't found. Author verified: bun typecheck passes, provider tests 88/88, transform tests 250/250 (+2 new for opencode).

A config workaround exists ("small_model": "<working-model>"), but it shouldn't be required — users on the opencode provider hit silent title failure by default. Could a maintainer review and reopen this so it can be merged?

All reactions

Sorry, something went wrong.

Uh oh!

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

@sergiomarquezdev sergiomarquezdev mentioned this pull request Sep 24, 2026
small_model is silently ignored once its model is marked deprecated in the catalog #51159
Closed
@ptfarina ptfarina mentioned this pull request Oct 12, 2026
[bug] v2.0.27 title agent ignores agents.title.model (and removed small_model), uses hardcoded gpt-5.4-nano #54692
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

automated-pr-cleanup

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

small_model ignored for title agent + FreeUsageLimitError retry loop blocks session for ~90s

Uh oh!

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

3 participants

@lexlian @beenotung @Jackdrakes
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.