Skip to content

fix(catalog): raise Muse Spark context window to 1M on OpenCode Go - #2785

Merged
lidge-jun merged 1 commit into
lidge-jun:devfrom
DevonGithub:codex/muse-spark-context
Aug 28, 2026
Merged

lidge-jun merged 1 commit into
lidge-jun:devfrom
DevonGithub:codex/muse-spark-context

Conversation

@DevonGithub

@DevonGithub DevonGithub commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Muse Spark 1.2 Contributor on OpenCode Go (Zen) serves a 1,048,576-token (1M) context window, matching its 1.1 sibling. The registry declared no modelContextWindows entry for it, so the catalog fell back to the 128k unknown-window default (resolveUnknownRoutedContextWindow). The Codex app then applied its 95% usable-context safeguard, showing only ~122k — far below what the model actually supports.

This adds muse-spark-1.2-contributor to opencode-go's modelContextWindows as 1_048_576, mirroring the existing 1M treatment of kimi-k3 and the DeepSeek vision preview on the same provider.

Only the context window is changed. It does not touch wire routing, modalities, reasoning efforts, or credentials.

Verification

bun x tsc --noEmit                                 exit 0
bun test tests/opencode-go-muse-context.test.ts    4 pass / 0 fail
bun test tests/opencode-go-muse-context.test.ts \
         tests/opencode-go-muse-vision.test.ts \
         tests/opencode-go-luna-wire.test.ts \
         tests/catalog-vision-sidecar-modalities.test.ts \
         tests/provider-registry-parity.test.ts      65 pass / 0 fail

Checklist

  • All CI tests are green on my local testing.
  • I pushed my PR to the latest dev commit.
  • I resolved all correct Codex and CodeRabbit findings.
  • My PR is ready for review.

Review readiness checklist

This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:

  • All CI tests are green on my local testing.
  • I pushed my PR to the latest dev commit.
  • I resolved all correct Codex and CodeRabbit findings.
  • My PR is ready for review.

Summary by CodeRabbit

  • Bug Fixes

    • Corrected the available context window for the muse-spark-1.2-contributor model to 1M tokens.
    • Ensured the correct context limit is consistently shown for configured and discovered model entries.
  • Tests

    • Added coverage to verify the model’s 1M-token context window across provider configuration and model discovery.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Aug 27, 2026
@coderabbitai

coderabbitai Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d38f18fe-8a79-46b0-b6b1-5e8a3826bb0d

📥 Commits

Reviewing files that changed from the base of the PR and between 50e9556 and 107f2cb.

📒 Files selected for processing (2)
  • src/providers/registry.ts
  • tests/opencode-go-muse-context.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The OpenCode Go registry now assigns a 1,048,576-token context window to muse-spark-1.2-contributor. Tests verify registry declaration, provider configuration, hints, and fallback behavior.

Changes

OpenCode Go context window

Layer / File(s) Summary
Declare and validate the context window
src/providers/registry.ts, tests/opencode-go-muse-context.test.ts
The registry entry at lines 1445-1448 declares the 1,048,576-token window. Tests verify that the value reaches seeded configuration, hinted model rows, and discovered rows without an explicit window.

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

Merge Risk: ⚪ Minimal · up to 107f2

The change correctly advertises the model’s 1M-token context window without altering routing, credentials, or request behavior; no actionable merge-blocking risk remains.

Suggested reviewers: ingwannu

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: increasing the Muse Spark context window to 1M tokens for the OpenCode Go catalog.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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

@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

✅ READY

  • all PR quality gates passed; the review readiness checklist is complete.

Review readiness checklist

  • ✅ All CI tests are green on my local testing.
  • ✅ I pushed my PR to the latest dev commit.
  • ✅ I resolved all correct Codex and CodeRabbit findings.
  • ✅ My PR is ready for review.

✅ 4/4 boxes ticked.

This pull request is already Ready for Review.
The review-ready label marks this PR as ready; review automation runs independently.
Maintainers: @lidge-jun @Ingwannu

@lidge-jun

Copy link
Copy Markdown
Owner

리뷰 · 우선순위 72 / 80

이 PR은 지금 dev HEAD 50e955604의 OpenCode Go 카탈로그에서 Muse Spark 1.2 Contributor의 컨텍스트 창을 고칩니다. 지금 src/providers/registry.ts의 opencode-go 항목은 이미 muse-spark-1.2-contributor를 modelWireDefaults로 /responses에 보내고, modelInputModalities로는 text+image까지 열어 두었습니다. 그런데 modelContextWindows에는 kimi-k3와 DeepSeek vision preview만 있고 Muse는 빠져 있습니다. 그래서 카탈로그가 src/providers/context-cap.ts의 resolveUnknownRoutedContextWindow로 떨어지고, 기본값 128000이 됩니다. Codex 앱은 그 값의 약 95%만 쓰니까 화면에는 대략 122k만 보입니다. 업스트림은 1,048,576(1M)인데 레지스트리만 빠진 상태입니다.

변경은 한 줄에 가깝습니다. modelContextWindows에 "muse-spark-1.2-contributor": 1_048_576을 넣고, tests/opencode-go-muse-context.test.ts로 레지스트리·시드·applyProviderConfigHints 경로를 잠급니다. 라우팅, 모달리티, 크리덴셜은 건드리지 않습니다. types.ts/config.ts 분할과도 무관하고, preview deploy도 필요 없습니다. 같은 제공자의 kimi-k3·DeepSeek vision이 이미 1M로 적혀 있으니 패턴도 맞습니다.

라인 src/providers/registry.ts modelContextWindows - Muse Spark 1.2 Contributor에 1_048_576을 선언합니다. 없으면 128k 폴백이 그대로입니다.

라인 tests/opencode-go-muse-context.test.ts - 레지스트리·시드·힌트 경로를 네 케이스로 고정합니다. 세 번째와 네 번째 테스트는 입력이 같아서 사실상 중복입니다. 나중에 discovered-row에 빈 window를 넣는 쪽으로 나누면 더 분명해집니다.

경로 muse-spark-1.1 형제 - PR 본문은 1.1 형제와 같다고 하는데, 지금 dev의 opencode-go.modelContextWindows에는 1.1 항목이 없습니다. 근거는 Meta/Zen 문서와 검증 날짜(2026-08-28)로 충분하지만, 레지스트리 안의 형제 거울은 아닙니다.

메인테이너의 판단이 필요한 지점

  • 비작성자 승인 후 exact-head CI가 초록이면 바로 dev 머지할지
  • 테스트 3·4를 하나로 합치거나 discovered-row 케이스를 진짜로 나눌지
  • meta/muse-spark-1.2(비-contributor)에도 같은 1M이 필요한지(지금 PR 범위 밖)

너의 추천
범위가 작고 dev에 바로 닿습니다. 승인·CI 초록이면 머지하세요. 테스트 중복은 머지 전후 어느 쪽이든 짧게 정리하면 됩니다.

이 댓글은 grok-bot이 작성했습니다

@Ingwannu Ingwannu left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Approved at exact head 107f2cbb281ae4db506471e911127cc2fc8fbb8b. I independently verified the current OpenCode model authority at https://models.dev/api.json: the opencode-go entry for muse-spark-1.2-contributor advertises limit.context = 1048576, and the live OpenCode Go /models roster advertises the same provider-specific model id. The focused regression passed 4/4 under isolated HOME/OPENCODEX_HOME/CODEX_HOME, and git diff --check is clean.

The last two tests currently exercise the same input, so the final test does not add a distinct discovered-row boundary; that is non-blocking for this one-line registry correction, but it would be better to make that fixture genuinely distinct in a follow-up. Local Bun 1.3.14 typecheck still stops on the three pre-existing RequestInit.timeout errors in src/server/claude-messages.ts and src/server/responses/fetch-helpers.ts, outside this diff. Merge should still wait for the repository's required exact-head CI checks.

lidge-jun added a commit to adtumk/opencodex that referenced this pull request Aug 28, 2026
dev's package.json said 2.35.0 while the repository had already published
v2.36.0-preview.20260829 (npm dist-tags: preview=2.36.0-preview.20260829,
latest=2.35.0). The preview bump was cut on the prerelease train and never came
back to dev, so tests/release-version-line.test.ts fails on every commit that
descends from dev:

  release version line > the in-tree version is never behind a released one
  package.json version 2.35.0 is BEHIND the highest release tag
  v2.36.0-preview.20260829

That is inherited red, not a defect in any of the pull requests hitting it. It
currently fails test 2/4, test 3/4, test 4/4, and macos on lidge-jun#2835, lidge-jun#2822, lidge-jun#2821,
lidge-jun#2796, lidge-jun#2797, and lidge-jun#2785 - six bug PRs whose own diffs are unrelated to release
tooling. Rebasing them onto an unrepaired dev cannot turn them green, which is
why this lands first.

2.36.0 rather than a preview suffix follows the precedent this repository set
twice: e4a85d1 moved dev to 2.34.0 when it trailed a published 2.33.0, and
076ad30 moved dev to 2.35.0 right after v2.34.0 shipped. dev carries the next
stable version; the preview train adds its own suffix at release time.

The value was chosen by running the repository's own comparator rather than by
reading it. Against the highest tag v2.36.0-preview.20260829, compareReleaseTags
returns -1 for 2.35.0 and 2.35.1, 0 for 2.36.0-preview.20260829 (legal only on
the commit that tag names, which a dev merge commit is not), and +1 for 2.36.0.
npm view @bitkyc08/opencodex@2.36.0 returns E404 and git tag --list v2.36.0 is
empty, so the string is unused.

Verification on this branch:
  bun test tests/release-version-line.test.ts   3 pass 0 fail (was 2 pass 1 fail)
  bun test tests/release-helper.test.ts         5 pass 0 fail
  bun test tests/compatibility-version.test.ts  1 pass 0 fail
@lidge-jun
lidge-jun merged commit 24f053b into lidge-jun:dev Aug 28, 2026
24 of 27 checks passed
tarunravi pushed a commit to tarunravi/opencodex that referenced this pull request Sep 14, 2026
dev's package.json said 2.35.0 while the repository had already published
v2.36.0-preview.20260829 (npm dist-tags: preview=2.36.0-preview.20260829,
latest=2.35.0). The preview bump was cut on the prerelease train and never came
back to dev, so tests/release-version-line.test.ts fails on every commit that
descends from dev:

  release version line > the in-tree version is never behind a released one
  package.json version 2.35.0 is BEHIND the highest release tag
  v2.36.0-preview.20260829

That is inherited red, not a defect in any of the pull requests hitting it. It
currently fails test 2/4, test 3/4, test 4/4, and macos on lidge-jun#2835, lidge-jun#2822, lidge-jun#2821,
lidge-jun#2796, lidge-jun#2797, and lidge-jun#2785 - six bug PRs whose own diffs are unrelated to release
tooling. Rebasing them onto an unrepaired dev cannot turn them green, which is
why this lands first.

2.36.0 rather than a preview suffix follows the precedent this repository set
twice: e4a85d1 moved dev to 2.34.0 when it trailed a published 2.33.0, and
076ad30 moved dev to 2.35.0 right after v2.34.0 shipped. dev carries the next
stable version; the preview train adds its own suffix at release time.

The value was chosen by running the repository's own comparator rather than by
reading it. Against the highest tag v2.36.0-preview.20260829, compareReleaseTags
returns -1 for 2.35.0 and 2.35.1, 0 for 2.36.0-preview.20260829 (legal only on
the commit that tag names, which a dev merge commit is not), and +1 for 2.36.0.
npm view @bitkyc08/opencodex@2.36.0 returns E404 and git tag --list v2.36.0 is
empty, so the string is unused.

Verification on this branch:
  bun test tests/release-version-line.test.ts   3 pass 0 fail (was 2 pass 1 fail)
  bun test tests/release-helper.test.ts         5 pass 0 fail
  bun test tests/compatibility-version.test.ts  1 pass 0 fail
tarunravi pushed a commit to tarunravi/opencodex that referenced this pull request Sep 14, 2026
…idge-jun#2785)

Co-authored-by: DevonGithub <22842728+DevonGithub@users.noreply.github.com>
agentHits pushed a commit to agentHits/opencodex that referenced this pull request Sep 17, 2026
dev's package.json said 2.35.0 while the repository had already published
v2.36.0-preview.20260829 (npm dist-tags: preview=2.36.0-preview.20260829,
latest=2.35.0). The preview bump was cut on the prerelease train and never came
back to dev, so tests/release-version-line.test.ts fails on every commit that
descends from dev:

  release version line > the in-tree version is never behind a released one
  package.json version 2.35.0 is BEHIND the highest release tag
  v2.36.0-preview.20260829

That is inherited red, not a defect in any of the pull requests hitting it. It
currently fails test 2/4, test 3/4, test 4/4, and macos on lidge-jun#2835, lidge-jun#2822, lidge-jun#2821,
lidge-jun#2796, lidge-jun#2797, and lidge-jun#2785 - six bug PRs whose own diffs are unrelated to release
tooling. Rebasing them onto an unrepaired dev cannot turn them green, which is
why this lands first.

2.36.0 rather than a preview suffix follows the precedent this repository set
twice: cfee468 moved dev to 2.34.0 when it trailed a published 2.33.0, and
2590f50 moved dev to 2.35.0 right after v2.34.0 shipped. dev carries the next
stable version; the preview train adds its own suffix at release time.

The value was chosen by running the repository's own comparator rather than by
reading it. Against the highest tag v2.36.0-preview.20260829, compareReleaseTags
returns -1 for 2.35.0 and 2.35.1, 0 for 2.36.0-preview.20260829 (legal only on
the commit that tag names, which a dev merge commit is not), and +1 for 2.36.0.
npm view @bitkyc08/opencodex@2.36.0 returns E404 and git tag --list v2.36.0 is
empty, so the string is unused.

Verification on this branch:
  bun test tests/release-version-line.test.ts   3 pass 0 fail (was 2 pass 1 fail)
  bun test tests/release-helper.test.ts         5 pass 0 fail
  bun test tests/compatibility-version.test.ts  1 pass 0 fail
agentHits pushed a commit to agentHits/opencodex that referenced this pull request Sep 17, 2026
…idge-jun#2785)

Co-authored-by: DevonGithub <22842728+DevonGithub@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working review-ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants