Repository navigation
Conversation
…d diagnostic context
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 96a1505048
ℹ️ 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".
| const correctionRetries = Number.isSafeInteger(configuredRetries) && configuredRetries >= 0 ? configuredRetries : 1; | ||
| for (let attempt = 0; attempt <= correctionRetries; attempt++) { | ||
| assertReplyTurn(); | ||
| const response = await this.modelSwitcher.chat({ |
There was a problem hiding this comment.
Surface SDK argument failures to the correction loop
For streamed native calls with malformed function.arguments, xsai parses the arguments before invoking the no-op tool, so ChatModel.chat() rejects rather than returning toolCalls; the existing truncated-argument test in chat-stream-errors.spec.ts already exercises this behavior. That rejection escapes this await, and the newly added invalid_argument_json feedback path is never reached. Once ordinary model retries are exhausted, the turn still stops regardless of nativeToolCorrectionRetries. Surface the raw, unexecuted calls as a recoverable validation result, and cover this through ChatModel rather than only a mocked switcher.
Useful? React with 👍 / 👎.
| JSON.parse(response.text!); | ||
| } catch { | ||
| toolMarkup = true; |
There was a problem hiding this comment.
Preserve literal tool tags in fenced legacy JSON
If a legacy response is fenced JSON and contains a literal <tool_call> inside a quoted message, this strict parse fails because of the fences and incorrectly classifies the response as tool markup. parseAndValidateResponse uses JsonParser, which accepts fenced JSON, so an otherwise valid legacy/fallback reply that previously worked is now retried or fails with native_tool_call_missing instead of being sent. Apply the same JSON normalization before classifying markup, or distinguish tags outside JSON string fields.
Useful? React with 👍 / 👎.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
修复原生工具调用异常导致回复中断,以及错误诊断信息缺失的问题
工具调用