Skip to content

fix(model): redact remaining provider error responses - #103

Open
XnLemon wants to merge 1 commit into
mainfrom
codex/phase2-remaining-error-redaction
Open

fix(model): redact remaining provider error responses#103
XnLemon wants to merge 1 commit into
mainfrom
codex/phase2-remaining-error-redaction

Conversation

@XnLemon

@XnLemon XnLemon commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Objective

Continue Phase2 closure by redacting sensitive provider error details from remaining model-visible provider error responses.

Completed Changes

  • Redacted OpenAI stream, non-streaming, and embedded HTTP 200 error response messages.
  • Redacted Gemini non-streaming, streaming, and malformed-function-call retry error messages.
  • Redacted HuggingFace non-streaming, streaming request, and stream read terminal error messages.
  • Added targeted regression coverage for Authorization bearer tokens, API keys, generic token/secret/password fields, and cookies.
  • Preserved existing response error type, Done state, embedded error code/param, and normal provider behavior.

Validation

  • go test ./model/openai -run 'TestExtractEmbeddedErrorResponse|TestModel_GenerateContent_EmbeddedErrorHTTP200|TestModel_GenerateContentIter_EmbeddedErrorHTTP200'
  • cd model/gemini && go test ./... -run 'TestModel_GenerateContentError|TestModel_GenerateContentStreamingError|TestModel_NonStreaming_MalformedFunctionCallRetryError'
  • go test ./model/huggingface -run 'TestModel_GenerateContent_NonStreaming|TestModel_GenerateContent_Streaming'
  • go vet ./model/openai
  • go vet ./model/huggingface
  • cd model/gemini && go vet ./...
  • git diff --check
  • Sub-agent open-code-review pass: 0 High / 0 Medium / 0 Low. OCR CLI config was unavailable, so the sub-agent performed read-only review following the skill flow.

Known Risks / Limitations

  • Scoped to OpenAI, Gemini, and HuggingFace provider error response paths identified in the Phase2 sweep.
  • Windows Git reported LF-to-CRLF working-copy warnings only; git diff --check passed.

Follow-up Work

  • Continue Phase2 closure by sweeping remaining graph/runtime/OpenClaw gateway model-visible raw error paths.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 20 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 Plus

Run ID: 8b228bf1-fe2a-45a1-afd1-b47e9bc17046

📥 Commits

Reviewing files that changed from the base of the PR and between 361e2a4 and 7d77989.

📒 Files selected for processing (6)
  • model/gemini/gemini.go
  • model/gemini/gemini_test.go
  • model/huggingface/huggingface.go
  • model/huggingface/huggingface_test.go
  • model/openai/openai.go
  • model/openai/openai_test.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/phase2-remaining-error-redaction

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

@XnLemon
XnLemon force-pushed the codex/phase2-model-provider-error-redaction branch from 649bd12 to 9188a9c Compare July 11, 2026 13:39
@XnLemon
XnLemon force-pushed the codex/phase2-remaining-error-redaction branch from 62643ed to d1662df Compare July 11, 2026 13:39
@XnLemon
XnLemon changed the base branch from codex/phase2-model-provider-error-redaction to main July 13, 2026 02:23
@XnLemon
XnLemon force-pushed the codex/phase2-remaining-error-redaction branch from d1662df to 7d77989 Compare July 13, 2026 02:34
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.

2 participants