Skip to content

Add native Exa-backed web_search support - #29342

Merged
JustinTong0323 merged 4 commits into
sgl-project:mainfrom
jonah-berman:codex/native-exa-web-search
Jun 27, 2026
Merged

JustinTong0323 merged 4 commits into
sgl-project:mainfrom
jonah-berman:codex/native-exa-web-search

Conversation

@jonah-berman

@jonah-berman jonah-berman commented Jun 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds native web_search support for GPT-OSS/SGLang Responses workflows, backed by Exa when EXA_API_KEY is configured on the SGLang server.

This keeps the user-facing abstraction provider-neutral (web_search) while using Exa as the default native backend for the existing hosted browser tool path. MCP tool servers remain available for advanced/custom tool configurations.

Details

  • Adds a centralized Exa client for Search and Contents API calls.
  • Enables BYOK via server-side EXA_API_KEY.
  • Tags Exa requests with x-exa-integration: sglang.
  • Uses server-side defaults:
    • numResults=10
    • type="auto"
    • highlights enabled
  • Adds native hosted browser tool support when no external tool server is configured.
  • Keeps provider details out of model-facing tool output.
  • Returns a clear error when web_search is requested without a browser backend.
  • Documents native web search setup and optional server-side Exa tuning env vars.

Tests

  • python -m py_compile on changed Python files
  • git diff --check
  • No-network framework smoke for NativeToolServer -> HarmonyBrowserTool -> ExaClient
  • Live Exa smoke through NativeToolServer -> HarmonyBrowserTool -> ExaClient -> Exa

CI States

Latest PR Test (Base): ✅ Run #28281139432
Latest PR Test (Extra): ⏳ Run #28429641199

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

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

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 25, 2026
…ation

- Migrate web_search doc updates to docs_new/ and revert legacy docs/
  (CI rejects edits under docs/).
- Register EXA_API_KEY and SGLANG_EXA_* on the Envs class; read them via
  envs instead of os.getenv, per env-var conventions.
- ExaSearchConfig: @DataClass -> msgspec.Struct (no-dataclasses rule).
- ExaClient: reuse a single long-lived aiohttp.ClientSession rather than
  creating one per request; add close() and clean up in lifespan.
- NativeToolServer: inherit DemoToolServer to drop duplicated methods;
  DemoToolServer gains aclose() and an enable_python flag.
- Drop dead tool_config property; document the 0->1 cursor remap.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

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

@JustinTong0323

Copy link
Copy Markdown
Collaborator

/tag-and-rerun-ci

@github-actions github-actions Bot added the run-ci CI: run the baseline test suite on this PR label Jun 27, 2026
@JustinTong0323

Copy link
Copy Markdown
Collaborator

/rerun-failed-ci

3 similar comments
@JustinTong0323

Copy link
Copy Markdown
Collaborator

/rerun-failed-ci

@JustinTong0323

Copy link
Copy Markdown
Collaborator

/rerun-failed-ci

@JustinTong0323

Copy link
Copy Markdown
Collaborator

/rerun-failed-ci

@JustinTong0323
JustinTong0323 merged commit 2f34dbe into sgl-project:main Jun 27, 2026
379 of 441 checks passed
@Fridge003 Fridge003 added the release-highlight Candidate PR for release note highlight label Jun 30, 2026
Chronostasys pushed a commit to MindLab-Research/sglang that referenced this pull request Aug 24, 2026
Co-authored-by: Xinyuan Tong <115166877+JustinTong0323@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation high priority release-highlight Candidate PR for release note highlight run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants