@jacobbd/relay-ai 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -150,9 +150,9 @@ In all cases `process.env['OPENCODE_API_KEY']` is set immediately so the key is
150
150
  - `--restore` globs `models-*.json` (CLI) and `app-models-*.json` (App); the new files are `models-favorites.json` and `app-models-favorites.json`.
151
151
  - Zen/Go favorites are skipped in Codex (use Claude or Desktop gateway).
152
152
 
153
- ## Release status (v0.2.3)
153
+ ## Release status (v0.2.5)
154
154
 
155
- Current version is **v0.2.3** — native provider registry, agent boot flags (`--provider` / `--model`), `relay-ai --ai`, Codex favorites catalog, and OpenCode cloud provider setup in `relay-ai providers add`.
155
+ Current version is **v0.2.5** — native provider registry, agent boot flags (`--provider` / `--model`), `relay-ai --ai`, Codex favorites catalog, Codex App restore handling, reasoning capability metadata, and OpenCode cloud provider setup in `relay-ai providers add`.
156
156
 
157
157
  **Known limitations (by design):**
158
158
  - Cost display in Codex is always inaccurate for non-Anthropic models.
package/CHANGELOG.md CHANGED
@@ -1,88 +1,13 @@
1
1
  # Changelog
2
2
 
3
- ## [Unreleased]
4
-
5
- ## [0.2.3] - 2026-06-15
6
-
7
- ### Added
8
- - **Cross-surface favorites catalog** — Codex CLI (`relay-ai codex`) and Codex App (`relay-ai codex-app`) use `relay-ai models` favorites for mid-session model switching.
9
- - Server wizard defaults to favorites-only catalog when favorites are configured.
10
- - Provider labels in gateway model picker when using favorites-only mode.
11
- - **OpenCode Zen / Go in `relay-ai providers add`** — dedicated cloud API key path; template search for "opencode" offers the correct add flow.
12
-
13
- ## [0.2.0] - 2026-06-10
3
+ ## [0.2.5] - 2026-06-18 (Official Launch Release)
14
4
 
15
5
  ### Added
16
- - **Native provider registry** — `relay-ai providers` command (add, import, list, remove, refresh-models)
17
- - Provider templates for 17+ SDK-backed providers and custom OpenAI/Anthropic endpoints
18
- - First-run inline wizard when registry is empty
19
- - Import key validation (rejects OpenCode placeholder keys; skips Vertex/Bedrock/Azure key storage)
20
- - Async pricing enrich with bundled `src/data/pricing-cache.json`
21
- - Secure trace logs under `~/.relay-ai/logs/`
22
- - [docs/TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md)
23
-
24
- ### Changed
25
- - **`relay-ai claude` / `models` / `server`** load from registry first — no `opencode serve` on launch
26
- - Removed `subscriptionTier` and config model-list cache (Zen filter lives on registry provider)
27
- - `--setup` now points users to `relay-ai providers`
28
-
29
- ## [0.1.0] - 2026-06-09
30
-
31
- ### Changed
32
- - **Rebrand:** `opencode-starter` → **`relay-ai`**. CLI command, config dir (`~/.relay-ai/`), and env override (`RELAY_AI_HOME`) updated throughout.
33
- - Migrates existing config from `~/.opencode-starter/` and legacy credential-store entries on first run.
34
-
35
- ## [0.3.0] - 2026-06-07
36
-
37
- ### Added
38
- - Local OpenCode provider discovery — launch Claude Code with any provider configured in OpenCode: Groq, Mistral, xAI, Google/Gemini, OpenAI, Anthropic-direct, Ollama, OpenRouter, Cerebras, Perplexity, Bedrock, Vertex, and more. Includes full Gemini thinking + tool calls, OpenAI Responses-API models (GPT-5.4+, GPT-5.5, Codex, o-series), and Mistral.
39
- - Bundled OpenCode SDK provider packages (Cerebras, Perplexity, Bedrock, Vertex, Azure, Together AI, DeepInfra, Alibaba, GitLab, Venice, and others) so any provider configured in OpenCode resolves at runtime without extra installs.
40
- - `relay-ai models` — interactive favorites manager (up to 20 models) for mid-session switching. With favorites set, Claude Code's `/model` switches live between your starting model and your favorites.
41
- - Model picker search and paginated browse for large catalogs; recent models per provider shown at the top of pickers.
42
- - Accurate `context_window` in synthetic `/v1/models` responses so Claude Code's status bar shows real remaining context.
43
- - `relay-ai server` exposes local-provider models with per-model routing; `GET /models` never returns API keys.
44
-
45
- ### Changed
46
- - All providers route through a single Vercel AI SDK adapter (`ai` + `@ai-sdk/*`), which owns wire format, endpoint selection, and provider quirks (Gemini `thought_signature`, xAI multi-agent `/responses`, Mistral message ordering). Both the `claude` launch proxy and the `server` command use it; Anthropic-format models remain direct passthrough.
47
- - Local provider discovery trusts OpenCode's `api.npm` — removed the static SDK allowlist; any configured provider appears in the picker and routes through the SDK adapter (except `@ai-sdk/anthropic` passthrough and `@ai-sdk/openai-compatible` without a base URL).
48
- - `createLanguageModel` is async and dynamically imports the `create*` factory from whatever npm package OpenCode assigns.
49
-
50
- ### Fixed
51
- - Local OpenAI providers: use OpenCode's `api.id` as the upstream model ID so catalog aliases (e.g. `gpt-5.5-fast` → `gpt-5.5`) don't hit `model_not_found` on the OpenAI API.
52
- - GPT-5.5 multi-turn reasoning: round-trip encrypted reasoning content via the Responses API without leaking SDK warnings into the Claude Code TUI.
53
-
54
- ### Docs
55
- - Note that Claude Code persists launched models to `~/.claude/settings.json` and may cache gateway catalogs — bare `claude` can show relay-ai aliases after a session.
56
- - Updated README and CLAUDE.md for SDK adapter proxy naming, OpenCode-trusted discovery, `upstreamModelId`, and provider compatibility.
57
-
58
- ## [0.2.5] - 2026-06-05
59
-
60
- - Fix: Pass `X-API-Key` headers to upstream servers for paid Anthropic-format models.
61
- - Fix: Blacklist deprecated MiMo models `mimo-v2-pro` and `mimo-v2-omni` to prevent runtime failures.
62
-
63
- ## [0.2.4] - 2026-06-05
64
-
65
- - Fix: Server network mode now displays the actual local LAN IP address instead of the `<this-computer-ip>` placeholder.
66
- - Fix: Server password prompt now shows input in plaintext so users can verify what they typed before confirming.
67
- - Fix: Server network mode startup output now shows the actual server password so users can share/copy it.
68
-
69
- ## [0.2.3] - 2026-06-05
70
-
71
- - Fix: The `relay-ai server` command now automatically resolves/loads the API key from the OS credential store (Keyring/Keychain/Credential Manager) if it's not exported in the shell environment.
72
- - Docs: Added instructions to the `README.md` on how to upgrade the package.
73
-
74
- ## [0.2.2] - 2026-06-05
75
-
76
- - Simplified dry-run key-save logging in `resolveOrCollectApiKey` — replaced a 7-branch `if-else` chain with a `Record<SaveChoice, string>` lookup table. No behavioral change.
77
-
78
- ## [0.2.1]
6
+ - **Native provider registry** — Add, list, remove, refresh, and import providers with secure OS credential storage and templates for OpenRouter, Groq, Mistral, Together AI, Zen/Go, and SDK-backed custom endpoints.
7
+ - **Claude Code and Codex launchers** — Launch registry models through `relay-ai`, including provider/model boot flags, local OpenCode provider discovery, recent models, search, pagination, and favorites catalogs for mid-session switching.
8
+ - **Unified SDK gateway** — Route non-Anthropic providers through the Vercel AI SDK adapter while preserving Anthropic-compatible tool use, streaming, context windows, and model catalogs.
9
+ - **Codex App integration** Launch the desktop app with registry providers and restore Codex App model settings after interrupted sessions.
10
+ - **Reasoning capability metadata** Resolve reasoning controls from provider metadata, including OpenRouter `supported_parameters`, so models such as GLM 5.2 receive compatible reasoning options instead of stale defaults.
11
+ - **Foreground server gateway** Run `relay-ai server` for Claude Desktop or LAN usage, with registry-backed routing, password protection, and optional Vertex AI support.
12
+ - **First-run setup** — Configure providers from an inline wizard or import existing OpenCode provider settings.
79
13
 
80
- - Changed the Claude Code launch path to the `relay-ai claude` command namespace. Bare `relay-ai` now prints help and migration guidance instead of launching Claude Code.
81
- - Preserved passthrough Claude Code args after `claude`, including `-c`, `--resume <session-id>`, session IDs, and args after `--`.
82
- - Added foreground `relay-ai server` mode for local or LAN API gateway use.
83
- - Added Anthropic-compatible and limited OpenAI-compatible server endpoints.
84
- - Moved app preferences and model cache to `~/.relay-ai/config.json`.
85
- - Added one-time migration from the previous OS-native config path.
86
- - Added opt-in saved server password support for network server mode.
87
- - Updated documentation with the supported tools command table, Claude examples, dry-run/setup/trace placement, and migration note.
88
- - Added MIT license file.
package/README.md CHANGED
@@ -11,7 +11,7 @@
11
11
  [![License](https://img.shields.io/npm/l/@jacobbd/relay-ai)](https://github.com/jacob-bd/relay-ai/blob/main/LICENSE)
12
12
  [![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-FFDD00?style=flat-square&logo=buy-me-a-coffee&logoColor=black)](https://buymeacoffee.com/jacobbd)
13
13
 
14
- **relay-ai** is an interactive CLI that launches AI coding tools and runs Anthropic-compatible API gateways on your machine. Today that means **Claude Code** and **Claude Desktop (Cowork + Code)**. Tomorrow we'll add more agents.
14
+ **relay-ai** is an interactive CLI that launches AI coding tools and runs local API gateways on your machine. Currently, it supports **Claude Code**, **Claude Desktop (Cowork + Code)**, the **OpenAI Codex CLI**, and the **Codex desktop app (macOS + Windows)**.
15
15
 
16
16
  Pick your backend:
17
17
 
@@ -71,7 +71,7 @@ Bare `relay-ai` prints help and migration guidance. Use `relay-ai claude` for th
71
71
  ## Prerequisites
72
72
 
73
73
  - Node.js 18+
74
- - A supported AI coding tool installed (e.g. [Claude Code](https://www.npmjs.com/package/@anthropic-ai/claude-code))
74
+ - A supported AI coding tool installed (e.g. [Claude Code](https://www.npmjs.com/package/@anthropic-ai/claude-code) or [OpenAI Codex](https://www.npmjs.com/package/@openai/codex))
75
75
  - At least one provider configured via `relay-ai providers add` or `import` — **or** an [OpenCode API key](https://opencode.ai/auth) for Zen/Go cloud backends
76
76
  - [OpenCode CLI](https://opencode.ai) only if you want **one-time import** from an existing OpenCode setup (optional)
77
77
  - For **Vertex gateway:** [Google Cloud SDK](https://cloud.google.com/sdk) with `gcloud auth application-default login`, a GCP project with Vertex AI enabled, and Claude partner models enabled in that project
@@ -255,7 +255,7 @@ relay-ai server --vertex
255
255
 
256
256
  **Shorthand aliases** (for Claude Code `/model` and `settings.json`): `sonnet`, `opus`, `haiku`. Append `[1m]` for 1M context on Sonnet and Opus only (Haiku stays 200k).
257
257
 
258
- **Custom catalog:** copy `vertex-models.example.json` to `~/.relay-ai/vertex-models.json` and edit. Override the config directory with `RELAY_AI_HOME`.
258
+ **Custom catalog:** copy `assets/vertex-models.example.json` to `~/.relay-ai/vertex-models.json` and edit. Override the config directory with `RELAY_AI_HOME`.
259
259
 
260
260
  When the gateway is running:
261
261