test(xai): declare the web-search field capability in the raw streaming config - #2263
Conversation
|
✅ Deterministic PR hygiene checks passed. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe xAI streaming test provider configuration now explicitly disables ChangesxAI streaming test configuration
Estimated code review effort: 1 (Trivial) | ~3 minutes Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 06c9728933
ℹ️ 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".
| modelSupportsServiceTier: { "grok-4.6": false }, | ||
| // Raw test config bypasses registry enrichment; production xai providers get | ||
| // this denial from the registry entry (see derive.ts enrichProviderFromRegistry). | ||
| supportsOpenAiWebSearchToolFields: false, |
There was a problem hiding this comment.
Exercise registry enrichment instead of hard-coding the capability
When an xAI configuration is created by the normal provider/OAuth seed or predates this field, it does not contain supportsOpenAiWebSearchToolFields: providerConfigSeed deliberately omits registry-only metadata, while the request path uses routedProviderConfig, which currently does not backfill this capability or call enrichProviderFromRegistry. Setting the value directly in this fixture therefore makes the test pass without exercising production behavior and masks external_web_access being forwarded to xAI, where it causes a 400 response. Leave the fixture field unset and add the missing request-time registry backfill in routedProviderConfig, retaining this assertion as the focused regression test.
AGENTS.md reference: AGENTS.md:L276-L278
Useful? React with 👍 / 👎.
Summary
Follow-up to #2262: the xAI Responses streaming test injects a raw provider config that bypasses registry enrichment, so the now-capability-gated external_web_access strip stopped firing there (lidge dev3: 1 fail / 14025). The test config now declares supportsOpenAiWebSearchToolFields: false exactly as production enrichment does (derive.ts backfills it from the registry entry).
Verification
Checklist
Summary by CodeRabbit