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(core): expand bare model aliases in the session runner by dezren39 · Pull Request #390 · developing-today-forks/opencode

Conversation

@dezren39

@dezren39 dezren39 commented Oct 24, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

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

Copy link
Copy Markdown

Fixes #385

Problem

PR #382 (Drew's, still open) makes the CLI pass a bare model alias through as { providerID: "flash", id: "" }, and fixes ModelResolver.resolve to expand it — but the path a CLI session actually runs through, SessionRunnerModel.resolve, still built the alias reference as `${providerID}/${id}`, producing "flash/". ModelAlias.resolveRef throws on the trailing slash, the throw is swallowed, and the run fails with Model unavailable: flash/.

Solution

  • packages/core/src/session/runner/model.ts: when the target's model id is empty, build the alias reference from the alias name alone — flash, or flash#<variant> when the target carries a variant — mirroring the construction PR fix(cli,core): resolve bare model aliases through the server path #382 adds to ModelResolver.resolve (and preserving the variant, which a provider-only string would drop). Non-empty targets are unchanged. This PR does not touch any file PR fix(cli,core): resolve bare model aliases through the server path #382 touches, so the two merge in either order.
  • ModelUnavailableError with an empty model id now renders Model unavailable: flash — the original user input — instead of flash/.
  • The runner's layer is now exported, matching ModelResolver.layer, so the service can be driven in tests.

Tests

New packages/core/test/session-runner-model.test.ts drives the real SessionRunnerModel service (mocked catalog/config/resolver dependencies, following generate.test.ts):

  • a bare-alias target { providerID: "flash", id: "" } with flash → deepseek/deepseek-chat#high configured resolves to the catalog model with variant high;
  • a bare-alias target carrying its own variant expands the same way;
  • an unknown bare name fails with Model unavailable: nope (not nope/).

Pre-fix all 3 fail (including the exact Model unavailable: nope/ message); post-fix 3/3 pass. Neighbouring suites pass: model-resolver.test.ts + config/aliases-normalize.test.ts + config/model.test.ts 58/58. Prettier clean on both changed files.

Note: GitHub Actions is still creating no runs repo-wide (#365), so verification is local.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • Bug Fixes
    • Bare provider aliases now resolve with their configured variant, and aliases targeting a provider and model resolve to the intended model.
    • Errors for unavailable models with an empty model ID now show the provider without a trailing slash.
    • Unknown bare model inputs continue to report the original input in the error message.

Sorry, something went wrong.

Uh oh!

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

All reactions
@dezren39
fix(core): expand bare model aliases in the session runner
bd51c78
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T14:14:39.239127Z 48f234c New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

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

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

Review in Change Stack →

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 11 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: b463ddd8-e015-4300-b82c-712b49630274
Commits

Reviewing files that changed from the base of the PR and between bd51c78 and 48f234c.

Files selected for processing: 1
  • packages/core/test/session-runner-model.test.ts

No actionable comments were generated in the recent review.

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: fedda7fa-d971-4534-93cb-8c4db2c82beb
Commits

Reviewing files that changed from the base of the PR and between 977ff07 and bd51c78.

Files selected for processing: 2
  • packages/core/src/session/runner/model.ts
  • packages/core/test/session-runner-model.test.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.

Walkthrough

The session runner now resolves bare provider aliases with empty model IDs, retains optional variants, and reports unknown bare inputs in ModelUnavailableError without a trailing slash.

Changes: Session runner alias resolution

Layer / File(s) Summary
Resolve bare aliases and validate results
packages/core/src/session/runner/model.ts, packages/core/test/session-runner-model.test.ts
Alias reference construction uses the provider ID alone when the model ID is empty and retains an optional variant. layer is now exported. Tests cover configured aliases, variants, and unknown inputs.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: kitlangton

Merge Risk: Minimal · up to bd51c

No actionable issue remains; the change is ready to merge after normal checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly identifies the main change: expanding bare model aliases in the session runner.
Description check Passed The description is detailed and on-topic. It identifies issue #385, explains the problem and solution, lists the tests and verification results, and notes the CI limitation. The template checkboxes an…
Linked Issues check Passed The changes satisfy the coding requirements in [#385]. SessionRunnerModel.resolve now builds flash or flash#<variant> for an empty model ID, so configured aliases can expand. The new session-run…
Out of Scope Changes check Passed The changes stay within [#385]. The ModelUnavailableError message fixes the required empty-ID error. Exporting layer supports the required service-level tests. The added test file verifies the ses…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Full details: Description check

Explanation

The description is detailed and on-topic. It identifies issue #385, explains the problem and solution, lists the tests and verification results, and notes the CI limitation. The template checkboxes and UI screenshot section are not completed, but they are non-critical for this non-UI change.

Full details: Linked Issues check

Explanation

The changes satisfy the coding requirements in [#385]. SessionRunnerModel.resolve now builds flash or flash#&lt;variant&gt; for an empty model ID, so configured aliases can expand. The new session-runner tests cover alias expansion without and with a variant. The unknown-name test expects Model unavailable: nope. The PR reports that the existing model-resolver, model-alias, and aliases-normalize tests pass.

Full details: Out of Scope Changes check

Explanation

The changes stay within [#385]. The ModelUnavailableError message fixes the required empty-ID error. Exporting layer supports the required service-level tests. The added test file verifies the session-runner behavior. No unrelated change is shown.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 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
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

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

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Oct 24, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bd51c78ce7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread packages/core/test/session-runner-model.test.ts
import { Provider } from "@opencode/core/provider"
import { SessionSchema } from "@opencode/core/session/schema"
import { SessionRunnerModel } from "@opencode/core/session/runner/model"
import { Info as ConfigInfo } from "@opencode/schema/config"

@chatgpt-codex-connector chatgpt-codex-connector Bot Oct 24, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove the renamed ConfigInfo import

The new Info as ConfigInfo value import violates the explicit no-import-alias rule in AGENTS.md; the exception for unavoidable type-only collisions does not apply here. Use the already imported Model namespace for Model.Info, freeing the unaliased Info name for the configuration schema.

AGENTS.md reference: AGENTS.md:L83-L84

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

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

All reactions
@dezren39 dezren39 mentioned this pull request Oct 24, 2026
fix(core): bare-alias variant is preserved by the session runner (PR #390) but dropped by ModelResolver (PR #382) #391
Closed
3 tasks
@dezren39
test(core): assert the bare-alias target variant wins over the alias …
48f234c
…target's
@dezren39

dezren39 commented Oct 24, 2026

Copy link
Copy Markdown
Author

Test strengthened in 48f234c (sweep follow-up): the bare-alias variant case now uses a target variant (low) that differs from the alias target's variant (flash -> deepseek/deepseek-chat#high) and asserts the full resolved ref, so it actually distinguishes preservation from replacement — the gap #391 flagged in this PR's own test.

Verified locally: session-runner-model 3/3; ablation with the variant dropped from the ref construction (provider-only string) fails exactly that one test; neighbouring suites (model-resolver + aliases-normalize + config/model) 58/58, 61/61 combined; prettier clean.

On #391: the ModelResolver half cannot land in this PR — the empty-id branch it would fix exists only in PR #382 (Drew's, hands-off, still open), and this PR deliberately touches no file #382 touches so the two merge in either order. The ModelResolver-side fix + a both-resolvers test is recorded as a SET-REMAINDER gated on #382 merging.

All reactions

Sorry, something went wrong.

Uh oh!

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

@dezren39
dezren39 merged commit 9b2651e into main Oct 24, 2026
1 check passed

Uh oh!

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

@dezren39
dezren39 deleted the sweep/385-bare-alias-runner branch October 24, 2026 14:16
This was referenced Oct 24, 2026
docs: ROADMAP Done table omits the #387 and #385 completions (PRs #388, #390) #392
Closed
docs: ROADMAP Done table omits the #392 completion (PR #393) #395
Closed
docs: record the #392 completion in ROADMAP Done #396
Merged
fix(schema): validate provider and variant alias targets #410
Merged
This was referenced Oct 25, 2026
fix(schema): reject empty model alias targets #413
Merged
fix(schema): use own-property alias lookups and reject padded alias targets #415
Merged
@dezren39 dezren39 mentioned this pull request Oct 26, 2026
Migrate the fleet to OpenCode 2 #374
Open
8 tasks
@coderabbitai coderabbitai Bot mentioned this pull request Oct 28, 2026
fix(core): preserve a bare-alias target's variant in ModelResolver (#391) #758
Merged
@dezren39 dezren39 added the audit:complete PR fully implemented spawning issue label Nov 24, 2026
@developing-today-fleet developing-today-fleet Bot mentioned this pull request Nov 24, 2026
fix(core): PR #382's bare-alias fix never reaches the session runner — SessionRunnerModel still expands "flash/" and the run fails Model unavailable #385
Closed
4 tasks
@dezren39 dezren39 mentioned this pull request Nov 24, 2026
AUDIT-7 Lane 2 — Closed-Issues Review (past month, since 2026-10-23) developing-today/code#13878
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

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

Assignees

No one assigned

Labels

audit:complete PR fully implemented spawning issue

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

fix(core): PR #382's bare-alias fix never reaches the session runner — SessionRunnerModel still expands "flash/" and the run fails Model unavailable

Uh oh!

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

1 participant

@dezren39
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.