Skip to content

v0.7.1

Choose a tag to compare

@github-actions github-actions released this 25 Jul 06:30

Added

  • Cloudflare Workers AI added as a native provider (relay-ai providers add) — hosts open-weight models (Llama, Gemma, GLM, Kimi, and others). Setup asks for a Cloudflare Account ID in addition to the API token (new accountIdPrompt template field), substituting it into the base URL (.../accounts/{ACCOUNT_ID}/ai/v1). Standard models get a free daily allowance (10,000 Neurons/day) tracked separately from list price so real pricing can still be shown; see docs/PROVIDERS.md for setup and known rate-limit/context-window gotchas.
  • Minimum context window enforcement — models below a target's usable context floor are now hidden from that target's picker/favorites instead of failing at launch with a cryptic error (e.g. Claude Code's 400 Bad Request, or Antigravity's config.MaxTokenLimit cannot exceed the planner model's context window limit). Floors: 128K for Claude Code, Codex, Codex/Claude desktop apps, and Gemini CLI (their system prompt + tool definitions already consume ~25K+ before the first message); 136K for Antigravity, which enforces its own stricter internal check (context window - max output tokens >= 128,000). The relay-ai server/ui API gateway target has no floor — callers own their own prompt size. Models with unreported context windows are never hidden (bad/missing registry metadata isn't the same as a small model). Saved Antigravity favorites below the floor are now dropped from the /model switch catalog rather than crashing agy when switched to.
  • Context window shown in model pickers — model selection now shows a compact 128k ctx tag next to price/free status (e.g. Free (10k/day) · 24k ctx, $1.25/$10 1M · 400k ctx) across CLI pickers, so context size is visible before launch.

Fixed

  • Antigravity now starts on mid-sized context windows (136K–193K) that previously failed. Antigravity's cascade executor requires at least 128K of input headroom; Relay was previously letting a model's full output-token allowance eat into that headroom (up to 65K), pushing the real usable floor to ~193K. Output tokens are now capped to leave the required 128K of input room, and every checkpoint config in the served catalog (including hidden cascade/plan anchor models) is clamped to fit the smallest model in the launch, so agy's precondition holds regardless of which entry it reads.
  • Antigravity gateway no longer executes a plain JSON answer as a tool call. A model replying with {"name": "Alice", "age": 30} was previously misdetected as a tool call named "Alice"; the gateway now only treats buffered JSON-shaped text as a tool call when the name matches a tool actually offered in that request.
  • Antigravity gateway no longer drops buffered text on a mid-stream provider error. Buffered JSON-shaped text is now flushed as a normal response before a stream error (rate limit, disconnect) is reported, instead of being silently discarded.
  • A stale isFree flag can no longer override real, non-zero pricing once it's resolved — a model only displays as free from a verified zero-cost price, a documented free-tier provider (e.g. NVIDIA), or an explicit provider-granted free-access rule (e.g. Cloudflare's 10,000 free Neurons/day on standard models, which is tracked separately from list price so it survives later pricing lookups).
  • Antigravity route catalog IDs are now sanitized to a safe slug (dots and other special characters replaced with _) to avoid malformed model identifiers sent to Antigravity's picker.

Changed

  • Linux support for relay-ai claude-app (#39) — the Claude Desktop 3P launcher now works on Linux in addition to macOS and Windows. The 3P inference config is written to $XDG_CONFIG_HOME/Claude-3p (Electron's userData + -3p), and app discovery, launch, running-detection, and graceful/force quit are implemented with process-name-exact matching (pgrep -x claude-desktop) so they can never collide with the relay-ai claude-app process itself. The Electron main process (the one without a --type= flag) is signalled for a clean whole-app shutdown.
  • Linux launch support for relay-ai antigravity and relay-ai antigravity-ide — binary discovery, launch, running-detection, and quit now work on Linux. Antigravity ships as a single VS Code-fork Electron binary (/usr/share/antigravity/antigravity) shared by both commands; they are kept isolated by distinct relay-managed --user-data-dir profile directories, and all process matching / kills are scoped to those profile dirs so the user's own Antigravity is never touched. (The local gateway and model injection already worked on Linux.)

Changed

  • Cross-platform quit paths in the Claude Desktop and Antigravity launchers are now explicit per-platform branches instead of a macOS/else split, removing a latent footgun where the Windows PowerShell quit path could run on Linux.

Fixed

  • Antigravity app/IDE launch no longer corrupts the terminal on Ctrl+C. The GUI launchers now spawn the app detached (its own process group) with stdio: 'ignore', matching the Claude Desktop launcher. Previously the app inherited relay's process group, so a Ctrl+C meant to stop the gateway also killed Antigravity mid-render, and its stdio: 'inherit' shutdown logs interleaved with relay's "Close Antigravity?" prompt — leaving the TTY in a raw state (stray ^[[D arrow-key echoes). Most visible on Linux, where Antigravity is far more verbose. The agy CLI launcher keeps stdio: 'inherit' as it needs the terminal.

Added

  • Embedded @jacobbd/relay-ai/core package for in-process consumers (#38) — a new side-effect-free subpath export lets a Node.js app use Relay AI as a library, without launching the CLI, UI, or server:
    • listRelayModels() returns a credential-free catalog of every enabled provider's cached models, with favorites, context windows, camelCase pricing, and reasoning capabilities (none / fixed / adjustable, with levels and defaults) derived from the existing getReasoningCapabilities() machinery.
    • createRelayModel(routeId) resolves the provider credential — transparently refreshing expiring OpenAI/xAI OAuth tokens through the existing refresh path — and returns a ready Vercel AI SDK LanguageModel. State is re-read on every call, so re-authentication or provider changes take effect without restarting the consumer.
    • Models are addressed by unconditionally-scoped route ids (`${providerId}::${modelId}`), safe to persist long-term even when multiple providers expose the same bare model id.
    • Errors are thrown as RelayCoreError with machine-readable codes (INVALID_ROUTE_ID, ROUTE_NOT_FOUND, PROVIDER_DISABLED, CREDENTIAL_UNAVAILABLE, OAUTH_REFRESH_FAILED, UNSUPPORTED_MODEL, UNSUPPORTED_REGISTRY_VERSION, PROVIDER_LOAD_FAILED) and never contain credential material.
    • Ownership boundary: Relay keeps sole ownership of provider registration, credentials, the OS keyring, and OAuth login/refresh; the consumer never receives or stores credential material.

Changed

  • loadRegistry() gains a { persist } option — in-memory legacy migrations still always run, but persisting them to providers.json can now be skipped by read-only callers (the embedded Core API uses this). Default behavior is unchanged.

Docs

  • New guide: docs/CORE.md — a full reference for embedding @jacobbd/relay-ai/core in any Node app: prerequisites, quick start, the complete API and RelayModelDescriptor field reference, route-id grammar, the full RelayCoreErrorCode table with retryable defaults, runtime guarantees, and troubleshooting. Linked from the README's command table and Embedded usage section.