Skip to main content

What Sedum sends, in short

Sedum sends the model the step’s sentence and a bounded description of the page: visible text, and the names and roles of elements. It does not send cookies, raw HTML, hidden text, or the values in form fields. Secrets from the environment are replaced by placeholders. Other visible page text is sent as it is. Use --sensitive-origin <url> to keep a page’s details and screenshots out of saved results. Screenshots (on by default for the direct TypeSafe API). Sedum also sends viewport screenshots: one with the chosen element outlined after each model-resolved click, type, or read, and one with each verify and measure step. Screenshots are not redacted: placeholders replace secrets in text, not in pixels, so a typed password field shows its dots and anything else on screen is sent as it looks. Pages matched by --sensitive-origin never send screenshots. Turn them off with screenshots: false in sedum.config.yaml or sedum run --no-screenshots. See Screenshots below. Exception: experimental run --affected. Test selection sends the retained committed merge-base(base, pinned HEAD)..pinned HEAD diff and complete candidate test/module sources. Dirty tracked state is refused even when ignored. affected.ignore plus repeatable --affected-ignore filters repository-relative paths before patch reads, but changed tests/module dependents are still forced. Environment variables are not expanded; committed secrets and test literals are transmitted as-is. Exclusions are not redaction or a privacy guarantee. --sensitive-origin protects browser evidence, not these source inputs. Lossless diff chunks prefer files, hunks, lines, then Unicode code points, with repeated file/hunk metadata; full test/module sources are never truncated. Serialized UTF-8 limits are 28,000 bytes for a diff plus one question and 56,000 per batch. A 16 MiB retained patch guard and preflight ceiling of 256 planned requests fail closed, as does a complete candidate source that cannot fit. Every non-forced candidate is scored against every chunk; its maximum score is an experimental heuristic, not calibrated whole-PR probability. The default cutoff is 0.3. All call receipts are retained; chunking adds billable calls, tokens, and latency, separate from runner costs. Any chunk failure stops selection. Review source before opting in. See Git-diff selection for clean-checkout commands, ignore semantics, and limits. Live accuracy remains unverified; evaluation spending needs separate approval, and this is not a mandatory CI gate. In a terminal, Sedum shows token use and cost after each run. A local locator cache skips repeat lookups during development.

Details

@sedum-dev/provider-typesafe implements the core Resolver and Judge interfaces with TypeSafe System One. Set TYPESAFE_API_KEY for the default TypeSafe endpoint. By default, the adapter uses the jev-latest model and the official TypeSafe HTTPS endpoint. To use a TypeSafe System One-compatible service instead, set its complete connection in the process or project-root .env:
These names match the TypeSafe SDK. Set the URL and key together for a custom service: the configured key is sent to that URL. The service must implement the TypeSafe SDK’s /v1/systemone wire contract; an OpenAI-compatible chat API is not sufficient. The configured model is included in provider receipts and is used to separate classification cache entries.

Screenshots

Screenshots use TypeSafe’s images preview, which TypeSafe calls “dreamer-ready”: the request format can change between releases. Requests with a screenshot carry the TypeSafe-Danger-Zone-Images: true header and use jev-1.14.0, which reads text and images together best; text-only requests keep jev-latest. A screenshot adds about 1,400–3,500 input tokens, billed at the normal input price, so a step with one costs about $0.0001 more.
  • Target check. After the text model picks an element, Sedum outlines it in a screenshot and asks whether several elements fit the step equally well. At a probability of 0.5 or more the step stops as ambiguous instead of clicking a guess; name the element more precisely. Locator cache hits are not checked again. On the locator benchmark’s held-out real sites this cut wrong actions from 12% to 5% of steps, for about one point of success.
  • Judge. verify and measure steps send the page text and a screenshot of the browser window, so claims about how the page looks (colors, icons, disabled controls, images, overlap) can be judged. The text still covers content scrolled out of view.
  • Vision fallback (opt-in, vision.enabled or --vision). When the text model cannot single out a click target, Sedum boxes and labels every visible candidate in a screenshot and asks Jev which label the step means, or to abstain. One request per step, about 3,400 input tokens (about $0.00015). See Vision fallback.
Screenshots fail open: if the service rejects an image request, Sedum judges from text and stops sending images for the rest of the run, and a failed target check keeps the text model’s pick. Gateways and other compatible services get no screenshots unless screenshots: true is set explicitly; Clef never gets them.

Vercel AI Gateway

Use Vercel’s TypeSafe-compatible API with the existing typesafe provider. In the project-root .env, set:
The key is a Vercel AI Gateway key, not a direct TypeSafe key. If your CI already supplies AI_GATEWAY_API_KEY, map it explicitly before running Sedum:
Plain validate is offline; run, doctor, and validate --online can make billable requests. Sedum does not automatically read AI_GATEWAY_API_KEY or switch endpoints when a gateway key is present. Set all three values together so credentials go to the intended service. Do not commit keys. Keep provider.name: typesafe (the default). If provider.model is set in sedum.config.yaml, it overrides TYPESAFE_DEFAULT_MODEL; remove it or set it to typesafe-ai/jev. Sedum calls /typesafe/v1/systemone, not the gateway’s Chat Completions or /v1/evaluate endpoint. For programmatic use:
Other decision models can use the same adapter with their gateway model ID, provided they support the System One choice and noul contract. Model IDs are passed through, not restricted to Jev. Other gateways work the same way if they expose that contract. This does not route the direct Cloudflare clef provider through Vercel or imply that Vercel offers Clef. Sedum requires probabilities for every offered choice. Language-model fallbacks returning probabilities: {} and confidence: 0 are rejected; Sedum cannot apply its confidence thresholds to missing probabilities. Gateway receipts retain the requested and returned model IDs and token usage. When the service supplies Vercel-style provider_metadata.gateway.cost, Sedum records that USD amount, including zero, without applying direct Jev pricing. Missing or invalid cost metadata leaves cost unknown. After any gateway retry, the successful response cost is retained but total cost stays unknown. Receipt provider identity remains typesafe, identifying the adapter.

OpenRouter

For OpenRouter, the CLI accepts provider: { name: openrouter, model: typesafe/jev-1.13 } with OPENROUTER_API_KEY (or OPEN_ROUTER_API_KEY); see gateway configuration. Programmatic callers use the same adapter with an explicit key and endpoint:
The SDK appends /v1/systemone. Use a gateway key, not a direct TypeSafe key. Gateway receipts use reported usage.cost when present, otherwise unknown cost. No direct Jev rate is applied, and retries (including 429s) make the total unknown. OpenRouter calls are identified as openrouter, regardless of the upstream model author. The gateway and its upstream provider receive the same bounded inputs described here; review both services’ data policies.

Request and response handling

The Resolver sends a sentence and bounded page candidate descriptions: opaque run-local ID, tag, role, accessible name, up to two peer excerpts, and editable/disabled flags. The Judge sends a claim and a bounded page digest. Allowed text is sent as-is to TypeSafe. It may contain customer or secret-looking content; the adapter does not sanitize it. The request builder does not copy URL, title, selectors, raw DOM, hidden text, cookies, or editable field values from observation objects. Callers must supply a digest produced by the bounded page extraction protocol. The adapter returns probabilities for every offered option, two independent Judge scores, reported token usage, and an estimated cost for the successful response. Its rate is checked into the source with a dated link. After retries, total cost is unknown because a failed attempt may have consumed tokens without reporting usage. Normal tests use recorded responses and need no API key. To run the two-call live check, supply a key and explicitly opt in:
The live check makes billable API calls. It prints model, usage, and estimated cost metadata only.