Skip to content

test(xai): declare the web-search field capability in the raw streaming config - #2263

Merged
lidge-jun merged 1 commit into
devfrom
codex/xai-streaming-test-capability
Aug 21, 2026
Merged

test(xai): declare the web-search field capability in the raw streaming config#2263
lidge-jun merged 1 commit into
devfrom
codex/xai-streaming-test-capability

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Aug 21, 2026

Copy link
Copy Markdown
Owner

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

  • tests/server-xai-responses-streaming.test.ts 3/0; tsc clean.

Checklist

  • Targets dev
  • Test-only

Summary by CodeRabbit

  • Tests
    • Updated xAI streaming test configuration to explicitly disable OpenAI web search tool field support.
    • Preserved existing streaming and namespace-restoration coverage.

@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner August 21, 2026 04:41
@lidge-jun lidge-jun added the bug Something isn't working label Aug 21, 2026
@lidge-jun
lidge-jun merged commit 6f1229a into dev Aug 21, 2026
6 of 7 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: a4be79b2-170d-4c18-bcfb-21f935e24b4b

📥 Commits

Reviewing files that changed from the base of the PR and between 2b988b3 and 06c9728.

📒 Files selected for processing (1)
  • tests/server-xai-responses-streaming.test.ts

📝 Walkthrough

Walkthrough

The xAI streaming test provider configuration now explicitly disables supportsOpenAiWebSearchToolFields and documents that raw test configuration bypasses registry enrichment. Existing streaming and namespace-restoration coverage is unchanged.

Changes

xAI streaming test configuration

Layer / File(s) Summary
Provider configuration
tests/server-xai-responses-streaming.test.ts
Lines 59–63 disable OpenAI web-search tool fields for the xAI test provider and document the registry-enrichment behavior. The model adapter and service-tier settings remain unchanged.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested reviewers: ingwannu

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/xai-streaming-test-capability

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 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,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant