Skip to content

searchapi: derive the 402 resource.url from the committed spec, drop … - #783

Merged
fretchen merged 4 commits into
mainfrom
agent_further
Nov 11, 2026
Merged

fretchen merged 4 commits into
mainfrom
agent_further

Conversation

@fretchen

Copy link
Copy Markdown
Owner

…SEARCH_SERVICE_URL

A leftover trial-deploy env value advertised the *.bunny.run origin as the payment scope on the direct routes, making #97600 unattributable to web-agent.fretchen.eu for indexers (cdp-sdk#835). resource.url is the payment scope, not the serving origin, so it now always names the production identity from openapi.search.json's servers[0].url — the same pattern as the llm twin. The stale env var was removed from script 97472 (verified live: search and fetch both quote https://web-agent.fretchen.eu now).

Generated by Mistral Vibe.

fretchen and others added 4 commits November 11, 2026 07:49
…SEARCH_SERVICE_URL

A leftover trial-deploy env value advertised the *.bunny.run origin as the
payment scope on the direct routes, making #97600 unattributable to
web-agent.fretchen.eu for indexers (cdp-sdk#835). resource.url is the payment
scope, not the serving origin, so it now always names the production identity
from openapi.search.json's servers[0].url — the same pattern as the llm twin.
The stale env var was removed from script 97472 (verified live: search and
fetch both quote https://web-agent.fretchen.eu now).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Each origin now serves a generated agent README at GET /, unconditionally
(agents send Accept: */*, so the old text/html gate hid it): spec title and
description, the well-known contracts (openapi.json, agent-registration,
oasf.json, MCP), prices from the spec's x-payment-info / the live price
ceiling, the x402 payment flow, a no-wallet curl that returns the honest
402, and the error semantics. The <link rel="icon"> x402scan parses stays
the first head element; nothing on the page is hand-restated.

- discovery.ts (bunny + scw twins): FAVICON_DISCOVERY_HTML + wantsHtml
  replaced by buildRootPage(RootPageInput); no callers of wantsHtml remain.
- searchapi_routes: page generated from the committed spec (prices per
  route from x-payment-info); serviceName -> "Fretchen Web Retrieval";
  spec title -> "Fretchen Web Retrieval - pay-per-call web access for agents".
- llm_routes: page with the live MAX_PRICE_ATOMIC ceiling, the testnet mock
  note, and the MCP link; serviceName -> "Fretchen LLM Inference"; spec
  title -> "Fretchen LLM Inference - pay-per-call chat completions for agents".
- mcp_routes: hand-composed gateway page (the origin relays, holds no spec
  of its own): links to both seller origins, its registration document,
  free initialize/tools/list curl, and the isError/structuredContent 402
  shape of an unpaid tools/call.
- genimg (scw): same scheme, generated from openapi.genimg.json (title and
  description unchanged - already capability-first, decided).
- tests: root serving is now unconditional and asserted with favicon-first,
  href, price and curl checks; the llm "non-POST" rejection moved from GET
  (now the root page) to PUT; pinned serviceNames and titles updated.
- READMEs: one entry each describing the root page.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
@fretchen
fretchen merged commit 2481b87 into main Nov 11, 2026
5 checks passed
@fretchen
fretchen deleted the agent_further branch November 11, 2026 16:27
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.

1 participant