Skip to content

fix(translator): GLM-5 system role handling (fix/5610) - #229

Merged
KooshaPari merged 1 commit into
mainfrom
land-fix5610
Jul 2, 2026
Merged

KooshaPari merged 1 commit into
mainfrom
land-fix5610

Conversation

@KooshaPari

Copy link
Copy Markdown
Owner

Summary

  • Preserve GLM 5.1/5.2 system-role behavior already present on main
  • Resolve literal conflict-marker artifacts from the fix/5610 landing path while keeping origin/main structure

Validation

  • npm exec --yes tsx -- --test tests/unit/role-normalizer.test.ts tests/unit/memory-glm-injection.test.ts
  • /opt/homebrew/bin/oxlint open-sse/services/roleNormalizer.ts tests/unit/role-normalizer.test.ts tests/unit/memory-glm-injection.test.ts

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@KooshaPari
KooshaPari merged commit 476ec5e into main Jul 2, 2026
16 of 27 checks passed
@KooshaPari
KooshaPari deleted the land-fix5610 branch July 2, 2026 23:24
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@KooshaPari, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 50 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: efbd9b00-2f42-4d1d-aa4f-25756e42df18

📥 Commits

Reviewing files that changed from the base of the PR and between e662c4c and dc36518.

📒 Files selected for processing (19)
  • CHANGELOG.md
  • README.md
  • config/quality/file-size-baseline.json
  • config/quality/quality-baseline.json
  • config/quality/test-masking-allowlist.json
  • docs/i18n/zh-TW/CHANGELOG.md
  • open-sse/executors/default.ts
  • open-sse/executors/opencode.ts
  • open-sse/mcp-server/__tests__/httpAuthContext.test.ts
  • open-sse/package.json
  • open-sse/services/roleNormalizer.ts
  • open-sse/translator/response/openai-to-claude.ts
  • src/lib/a2a/routingLogger.ts
  • src/lib/providers/validation.ts
  • tests/snapshots/provider/translate-path.json
  • tests/unit/refactor-buildHeaders-opencode.test.ts
  • tests/unit/request-log-detail-layout.test.ts
  • tests/unit/role-normalizer.test.ts
  • vitest.mcp.config.ts

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "review"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch land-fix5610

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 Jul 2, 2026

Copy link
Copy Markdown

L17 Latency Budget Report

--- Latency Budget Summary ---
  Total endpoints checked: 0
  Passed: 0
  Warnings: 0
  Failures: 0

Checked against: budgets/rest-endpoints.yaml.

@sonarqubecloud

sonarqubecloud Bot commented Jul 2, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@@ -238,7 +234,6 @@ export function openaiToClaudeResponse(chunk, state) {
// for Responses→Claude streams (#5828 regression).
if (choice.finish_reason && !state.claudeFinishEmitted) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

SUGGESTION: claudeFinishEmitted not initialized in initState()

openai-to-claude.ts:235 now guards emit with !state.claudeFinishEmitted, but open-sse/translator/index.ts:563 (initState()) never initializes the property. It happens to work because undefined is falsy, but that is fragile — any future check that omits the negation (e.g. if (state.claudeFinishEmitted)) would silently break the diegosouzapw#5828 duplicate-finish guard.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

export { validateCommandCodeProvider, validateClaudeCodeCompatibleProvider };
=======
const OPENAI_LIKE_FORMATS = new Set(["openai", "openai-responses"]);
const GEMINI_LIKE_FORMATS = new Set(["gemini", "gemini-cli"]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

WARNING: GEMINI_LIKE_FORMATS diverges from urlHelpers.ts

This inline definition includes "gemini-cli" (new Set(["gemini", "gemini-cli"])), but src/lib/providers/validation/urlHelpers.ts:11 exports the same constant as new Set(["gemini"]) only. Other validation modules (openaiFormat.ts, cloudProviders.ts, etc.) import from urlHelpers.ts and would not recognize gemini-cli as a Gemini-like format. The conflict resolution kept the gemini-cli branch here but did not propagate it to the split-out helper module.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

Comment thread vitest.mcp.config.ts
@@ -15,10 +15,6 @@ export default defineConfig({
"open-sse/mcp-server/__tests__/**/*.test.ts",
"open-sse/services/autoCombo/__tests__/**/*.test.ts",
"open-sse/services/combo/__tests__/**/*.test.ts",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

WARNING: Test file removed from vitest discovery

open-sse/services/__tests__/antigravity-quota-family.test.ts still exists on disk but was dropped from the include array. If the test is intentionally no longer run by MCP vitest, the file should be deleted or moved; if it is still valid, it should remain in the include list so MCP test runs continue to cover it.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Jul 4, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
WARNING 2
SUGGESTION 1
Issue Details (click to expand)

WARNING

File Line Issue
src/lib/providers/validation.ts 87 GEMINI_LIKE_FORMATS diverges from urlHelpers.ts — this inline def includes "gemini-cli" but urlHelpers.ts:11 exports only ["gemini"]
vitest.mcp.config.ts 17 open-sse/services/__tests__/antigravity-quota-family.test.ts removed from include but still exists on disk

SUGGESTION

File Line Issue
open-sse/translator/response/openai-to-claude.ts 235 claudeFinishEmitted not initialized in initState()
Files Reviewed (19 files)
  • CHANGELOG.md
  • README.md
  • config/quality/file-size-baseline.json
  • config/quality/quality-baseline.json
  • config/quality/test-masking-allowlist.json
  • docs/i18n/zh-TW/CHANGELOG.md
  • open-sse/executors/default.ts
  • open-sse/executors/opencode.ts
  • open-sse/mcp-server/__tests__/httpAuthContext.test.ts
  • open-sse/package.json
  • open-sse/services/roleNormalizer.ts
  • open-sse/translator/response/openai-to-claude.ts
  • src/lib/a2a/routingLogger.ts
  • src/lib/providers/validation.ts
  • tests/snapshots/provider/translate-path.json
  • tests/unit/refactor-buildHeaders-opencode.test.ts
  • tests/unit/request-log-detail-layout.test.ts
  • tests/unit/role-normalizer.test.ts
  • vitest.mcp.config.ts

Fix these issues in Kilo Cloud


Reviewed by step-3.7-flash-20260528 · Input: 750.5K · Output: 28.3K · Cached: 5.5M

@KooshaPari
KooshaPari restored the land-fix5610 branch July 16, 2026 03:33
@KooshaPari
KooshaPari deleted the land-fix5610 branch August 13, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant