betahi-copilot-bridge 0.20.9 → 0.20.11

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/README.md CHANGED
@@ -1,11 +1,11 @@
1
1
  <h1 align="center">copilot-bridge</h1>
2
2
 
3
3
  <p align="center">
4
- <a href="https://www.npmjs.com/package/betahi-copilot-bridge"><img src="https://img.shields.io/npm/v/betahi-copilot-bridge.svg?v=0.20.8" alt="npm version"></a>
4
+ <a href="https://www.npmjs.com/package/betahi-copilot-bridge"><img src="https://img.shields.io/npm/v/betahi-copilot-bridge.svg?v=0.20.11" alt="npm version"></a>
5
5
  <a href="https://github.com/betahi/copilot-bridge/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/betahi-copilot-bridge.svg" alt="license"></a>
6
6
  </p>
7
7
 
8
- > Use GitHub Copilot as a local OpenAI/Anthropic-compatible API, so [Codex CLI](https://developers.openai.com/codex/cli), [Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview) and Continue can talk to Copilot with minimal configuration.
8
+ > Use GitHub Copilot as a local OpenAI/Anthropic-compatible API, so [Codex CLI](https://developers.openai.com/codex/cli), [Codex App](https://developers.openai.com/codex/app), [Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview) and Continue can talk to Copilot with minimal configuration.
9
9
 
10
10
  > [!CAUTION]
11
11
  > This is an unofficial bridge for the GitHub Copilot API and may break if the
@@ -15,7 +15,7 @@
15
15
  - [Demo](#demo)
16
16
  - [Why this bridge?](#why-this-bridge)
17
17
  - [Install & run](#install--run)
18
- - [Configure Codex CLI](#configure-codex-cli)
18
+ - [Configure Codex CLI or Codex App](#configure-codex-cli-or-codex-app)
19
19
  - [Configure Claude Code](#configure-claude-code)
20
20
  - [Web Search](#web-search)
21
21
  - [Start flags](#start-flags)
@@ -31,6 +31,10 @@
31
31
 
32
32
  ![Codex demo](assets/screenshots/codex_demo.png)
33
33
 
34
+ ### Codex App
35
+
36
+ ![Codex App demo](assets/screenshots/codex_app_support.png)
37
+
34
38
  ### Claude Code
35
39
 
36
40
  ![Claude demo](assets/screenshots/claude_demo.png)
@@ -39,8 +43,9 @@
39
43
 
40
44
  copilot-bridge is more than a raw HTTP proxy:
41
45
 
42
- 1. **Codex and Claude support.** Exposes Codex `/v1/responses`, Claude Code
43
- `/v1/messages`, and OpenAI-compatible chat, embeddings, and models routes.
46
+ 1. **Codex CLI, Codex App, and Claude support.** Exposes Codex `/v1/responses`,
47
+ Claude Code `/v1/messages`, and OpenAI-compatible chat, embeddings, and
48
+ models routes.
44
49
  2. **Web search support.** Model-selected web search can be executed by the
45
50
  bridge and fed back into a final model pass.
46
51
  3. **End-to-end reasoning support.** Normalizes model aliases and
@@ -69,12 +74,13 @@ The bridge exposes both adapter-style endpoints (`/v1/responses`,
69
74
  LiteLLM, Continue, Cline and Aider work out of the box. CORS is enabled
70
75
  globally for browser-based clients.
71
76
 
72
- ## Configure Codex CLI
77
+ ## Configure Codex CLI or Codex App
73
78
 
74
- `start` writes a managed block into **`~/.codex/config.toml`**. You don't edit
75
- between the markers; the bridge regenerates that block on every start. To pin
76
- the **default model** for `codex` (without passing `-m` every time), add your
77
- top-level keys above the managed block:
79
+ Codex CLI and Codex App use the same provider config in
80
+ **`~/.codex/config.toml`**. `start` writes a managed block into that file. You
81
+ don't edit between the markers; the bridge regenerates that block on every
82
+ start. To pin the **default model** for Codex clients, add your top-level keys
83
+ above the managed block:
78
84
 
79
85
  ```toml
80
86
  # User defaults; edit these freely.
@@ -97,6 +103,12 @@ requires_openai_auth = false
97
103
  Use `--no-codex-setup` to skip this writer if you manage
98
104
  `~/.codex/config.toml` yourself.
99
105
 
106
+ The managed config also keeps Codex CLI's `/status` context-window display in
107
+ sync with Copilot model metadata. For example, GPT-5.5 shows a 1.05M context
108
+ window through the bridge:
109
+
110
+ ![Codex context window](assets/screenshots/codex_2.png)
111
+
100
112
  ### Codex warning: "Model metadata ... not found"
101
113
 
102
114
  This is a Codex client-side metadata warning, not a bridge routing failure, requests can still complete through the bridge.
@@ -207,6 +219,7 @@ Common:
207
219
  | `--host <host>` | Bind address. Defaults to `127.0.0.1`. |
208
220
  | `--port <port>` | Listen port. Overrides `$PORT` and the port inferred from Claude settings. |
209
221
  | `--model <model>` | Override the request model for this bridge process only; does not edit config files. |
222
+ | `--auto` | Acquire a Copilot Auto session and attach its session token only to upstream `/chat/completions` and `/responses` requests. Codex model selection is limited to Auto-available models. |
210
223
  | `--rate-limit <seconds>` | Enforce a minimum delay between upstream requests. |
211
224
  | `--wait` | With `--rate-limit`, wait instead of returning HTTP 429. |
212
225
 
@@ -267,22 +280,16 @@ accepts upstream.
267
280
 
268
281
  | Model | Reasoning efforts | Notes |
269
282
  | -------------------------------- | --------------------------------------- | -------------------------------------- |
270
- | `claude-opus-4.7` | `medium` | Effort sent as `output_config.effort`. |
271
- | `claude-opus-4.7-1m` | `low`, `medium`, `high`, `xhigh` | 1M-token context window, prefer use `claude-opus-4.7-[1m]` in config|
272
- | `claude-opus-4.7-high` | `high` | Fixed high reasoning|
273
- | `claude-opus-4.7-xhigh` | `xhigh` | Fixed extra-high reasoning|
283
+ | `claude-opus-4.8` | `medium` | |
284
+ | `claude-opus-4.7` | `low`, `medium`, `high`, `xhigh` | Effort sent as `output_config.effort`. |
285
+ | `claude-opus-4.7-1m` | `low`, `medium`, `high`, `xhigh` | 1M-token context window, prefer use `claude-opus-4.7-[1m]` in config. |
274
286
  | `claude-opus-4.6` | `low`, `medium`, `high` | |
275
287
  | `claude-opus-4.6-1m` | `low`, `medium`, `high` | 1M-token context window, prefer use `claude-opus-4.6-[1m]` in config |
276
288
  | `claude-sonnet-4.6` | `low`, `medium`, `high` | |
277
289
  | `claude-opus-4.5` | — | Reasoning not accepted upstream. |
278
290
  | `claude-sonnet-4.5` | — | Reasoning not accepted upstream. |
279
- | `claude-sonnet-4` | — | Reasoning not accepted upstream. |
280
291
  | `claude-haiku-4.5` | — | Reasoning not accepted upstream. |
281
292
 
282
- For Claude Opus 4.7, both Codex CLI and Claude Code can use
283
- `claude-opus-4.7` with reasoning effort `high` or `xhigh`; the bridge routes the
284
- request to the matching upstream reasoning variant.
285
-
286
293
  For Claude Code settings, prefer `claude-opus-4.7-[1m]` or
287
294
  `claude-opus-4.6-[1m]` when you want the CLI `/context` UI and the upstream
288
295
  model to both use 1M context. Direct API clients can use