Repository navigation
Bring agent_run, web search, and the HTTP runtime up to hosted parity - #449
Merged
Merged
Conversation
agent_run advertises run ID patterns that compile as unicode-mode regexes (strict providers rejected the old tool list), declares an MCP outputSchema and returns structuredContent, accepts the ultra effort and the polymarket and macrobond providers, is marked openWorldHint, names only registered sibling tools in its description, explains 402 as not retryable, is on by default for callers with their own key, and hands its run ID back after a 45s call window. The Exa Agent skill documents the new result shape. web_search_exa takes an optional objective, forwarded to /search, and web_search_advanced_exa is marked openWorldHint. EXA_API_BASE_URL overrides the Exa API origin the tools call. The HTTP handler validates Accept media ranges (406), redacts ?exaApiKey= from debug logs, and prefers a ?exaApiKey= URL key over a Bearer JWT, retrying a rejected key once on the JWT through McpConfig.apiKeyFallback. The container runtime keeps idle SSE streams alive, drains in-flight requests on SIGTERM/SIGINT without waiting out kept-alive connections, survives unhandled rejections, and answers malformed requests with 400. Tests are split into unit and integration suites; the integration suite drives the runtime server against a fake Exa API and runs in npm run ci. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Models see objective in the tool schema's required list, so they state a goal for every search, while calls that omit it (or send null or "") still search without one. advertisedRequired decouples the advertised required list from what the schema accepts. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the OSS tool surface and HTTP runtime up to parity with the hosted mcp.exa.ai server.
agent_runadvertises unicode-safe run ID patterns (strict providers rejected the old tool list), returnsstructuredContentagainst a declaredoutputSchema, acceptsultraeffort plus thepolymarketandmacrobondproviders, is markedopenWorldHintwith 402-aware errors and a description naming only registered tools, is on by default for callers with their own key, and hands back its run ID after a 45s call window, with the Exa Agent skill updated to match.web_search_exagains an optionalobjective,web_search_advanced_exais markedopenWorldHint, andEXA_API_BASE_URLoverrides the Exa API origin; the HTTP handler validates Accept media ranges, redacts?exaApiKey=from debug logs, and prefers a URL key over a Bearer JWT with a one-time retry on the JWT when the key is rejected (McpConfig.apiKeyFallback). The container runtime adds SSE keepalives, a graceful SIGTERM/SIGINT drain, and 400s for malformed requests, and tests are split into unit and integration suites (the latter drives the runtime against a fake Exa API) thatnpm run ciruns together.🤖 Generated with Claude Code