Skip to content

fix(chat): recognize Eliza qwen3-8-27b checkpoint ids in the leading-system template - #6385

Merged
lidge-jun merged 2 commits into
lidge-jun:devfrom
arikon:qwen38-leading-system-eliza-checkpoint-ids
Oct 1, 2026
Merged

lidge-jun merged 2 commits into
lidge-jun:devfrom
arikon:qwen38-leading-system-eliza-checkpoint-ids

Conversation

@arikon

@arikon arikon commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The leading-system template selector in the openai-chat adapter matched only Qwen3.8-27B (optionally Qwen/-prefixed). Internal Eliza serves the same pinned vLLM chat template under dashed checkpoint ids — qwen3-8-27b-fp8, qwen3-8-27b-lora — so routing those models through OpenCodex failed upstream with:

  • 400 System message must be at the beginning (mid-conversation developer folded to system)
  • 400 Unexpected message role (with foldDeveloperRoleToSystem: false, the message went out as developer)

Extend the selector to also match the dashed checkpoint family qwen3-8-27b with optional -fp8/-lora suffixes. The dotted Qwen3.8-27B-FP8 stays outside the selector, as before.

Verification

  • bun test tests/adapters/openai/openai-chat-qwen38-leading-system.test.ts — 6/6 pass, including the two new checkpoint-id cases
  • Full openai adapter suite: 599 pass, 0 fail
  • End-to-end through the proxy: codex exec --model eliza-internal-qwen/qwen3-8-27b-fp8 answers pong (previously the 400s above)
  • Regex checked directly: qwen3-8-27b-fp8 (match), qwen3-8-27b-lora (match), Qwen3.8-27B (match), Qwen/Qwen3.8-27B (match), Qwen3.8-27B-FP8 (no match), qwen3-6-27b-lora (no match)

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Review readiness checklist

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

  • Required local validation passed; commands, results, and any full-suite exception are documented.

  • I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed message handling for additional Qwen model ID formats when using non-native OpenAI Chat targets. Reminders are now sent as user messages for these models.

Copilot AI balanced review requested due to automatic review settings October 1, 2026 10:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@github-actions github-actions Bot added the intake: hygiene-blocked Deterministic PR hygiene checks failed label Oct 1, 2026
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

⚠️ Deterministic hygiene checks failed.

  • missing_regression_test — Behavior changed under src/ or gui/src/ without a test change. Add focused coverage or obtain test-exception-approved.

@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

🧰 Additional context used
📚 Code guidelines (1)
src/AGENTS.md — auto-discovered

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: f74d2e24-dfcb-4863-bf8b-5c2d7b15cc6b

📥 Commits

Reviewing files that changed from the base of the PR and between a6114b6 and fc61562.

📒 Files selected for processing (2)
  • src/adapters/openai-chat/messages.ts
  • tests/adapters/openai/openai-chat-qwen38-leading-system.test.ts

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


📝 Walkthrough

Walkthrough

The non-native OpenAI Chat template matcher now recognizes additional Qwen model ID forms. The parameterized regression test checks those forms using the existing serialization and template-acceptance assertions.

Changes

Qwen template handling

Layer / File(s) Summary
Extend Qwen model matching
src/adapters/openai-chat/messages.ts, tests/adapters/openai/openai-chat-qwen38-leading-system.test.ts
The matcher accepts qwen3-8-27b with optional -fp8 or -lora suffixes, case-insensitively. The test adds the two suffixed IDs and retains the existing assertions.

Priority: ➖ Normal

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

Change: Bug fix

Merge Risk: ⚪ Minimal · up to fc615

The change recognizes additional Qwen checkpoint IDs while preserving the existing template-compatible message handling. No actionable merge-blocking risk remains in the supplied evidence.

Architecture Summary

Architecture risk: 🔵 Low · up to fc615

The change affects 2 systems.

Changed systems: src, tests

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — src (service) was modified; 1 changed file maps to changed impact.
  • observed — tests (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in src/adapters/openai-chat/messages.ts: The non-native Chat template match now also accepts qwen3-8-27b with optional -fp8 or -lora suffixes, case-insensitively; the prior Qwen3.8-27B match with optional Qwen/ prefix remains.
  • observed — Modified behavior in tests/adapters/openai/openai-chat-qwen38-leading-system.test.ts: The parameterized test adds qwen3-8-27b-fp8 and qwen3-8-27b-lora to the existing Qwen model IDs; all cases retain the same late-reminder serialization and template-acceptance assertions.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 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: recognizing Eliza qwen3-8-27b checkpoint IDs in the leading-system template.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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 changed the title Recognize Eliza qwen3-8-27b checkpoint ids in the leading-system template selector [WRONG BRANCH] Recognize Eliza qwen3-8-27b checkpoint ids in the leading-system template selector Oct 1, 2026
@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

✅ READY

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

Review readiness checklist

  • ✅ Required local validation passed; commands, results, and any full-suite exception are documented.
  • ✅ I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
  • ✅ 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

@github-actions
github-actions Bot marked this pull request as draft October 1, 2026 10:41
@arikon
arikon changed the base branch from main to dev October 1, 2026 10:44
@github-actions github-actions Bot added the bug Something isn't working label Oct 1, 2026
@github-actions github-actions Bot changed the title [WRONG BRANCH] Recognize Eliza qwen3-8-27b checkpoint ids in the leading-system template selector Recognize Eliza qwen3-8-27b checkpoint ids in the leading-system template selector Oct 1, 2026
@arikon
arikon force-pushed the qwen38-leading-system-eliza-checkpoint-ids branch from e20ab2c to fc61562 Compare October 1, 2026 10:47
@github-actions github-actions Bot removed the intake: hygiene-blocked Deterministic PR hygiene checks failed label Oct 1, 2026
@arikon arikon changed the title Recognize Eliza qwen3-8-27b checkpoint ids in the leading-system template selector fix(chat): recognize Eliza qwen3-8-27b checkpoint ids in the leading-system template Oct 1, 2026
@github-actions
github-actions Bot marked this pull request as ready for review October 1, 2026 10:52
@lidge-jun

Copy link
Copy Markdown
Owner

Maintainer integration record (MAINTAINERS.md, dev-only) — draft by release lane L2

  • PR fix(chat): recognize Eliza qwen3-8-27b checkpoint ids in the leading-system template #6385 by @arikon (fork, maintainerCanModify): fix(chat): recognize Eliza qwen3-8-27b checkpoint ids in the leading-system template.
  • Exact head: fc6156278e42087a7788fd36e1a82f4a139917aa. merge-tree against origin/dev de4b2e2 (after fix(xai): authorize the Fast wire model across API endpoints #6373) clean.
  • Hosted CI at this head: Cross-platform CI run 36851335539 success on attempt 2 (pull_request; the fork run was action_required until approved by the release lane). Jobs: changes=success, select windows runner=success, api usage=success, storage policy=success, test 1/4=success, test 2/4=success, npm-global ubuntu-latest=success, docker smoke=success, npm-global windows-latest=success, test 3/4=success, keyring windows=success, keyring ubuntu=success, test 4/4=success, gates=success, ci=success. React Doctor 36851335389 success.
  • Local suites: not run, by explicit owner instruction. Hosted CI is the only execution evidence.
  • Review: independent read-only reviewer — correctness PASS at fc61562. The regex is anchored and does not over-match qwen3-8b, qwen3-80b, qwen3.8-270b or the dotted -FP8 id; no other source path keys on this template. Not a security-boundary change.
  • Non-blocking follow-ups (P3): add negative dashed-id cases (qwen3-6-27b-lora, qwen3-8-27b-awq) and bare qwen3-8-27b positive case; docs-site/src/content/docs/reference/adapters.md:58 names only Qwen3.8-27B.
  • Attribution: authored by @arikon; not a carry.

@lidge-jun
lidge-jun merged commit c94fcf5 into lidge-jun:dev Oct 1, 2026
52 of 53 checks passed
@arikon
arikon deleted the qwen38-leading-system-eliza-checkpoint-ids branch October 1, 2026 16:00
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