copilot-api-node20 0.46.0-preview.1 → 0.47.0

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
@@ -21,6 +21,7 @@ Want Claude Code on GPT and other non-Claude models? Pick one from your Copilot
21
21
  OpenAI SDK ─┤ /v1/chat/ └─────────────┘ │ Responses API
22
22
  curl ─┤ completions │ Embeddings
23
23
  Any tool ─┘ │ Images
24
+ │ Decisions
24
25
  │
25
26
  ├─▶ Microsoft Foundry /
26
27
  │ Azure OpenAI
@@ -66,6 +67,7 @@ Want Claude Code on GPT and other non-Claude models? Pick one from your Copilot
66
67
  | **Copilot fallback** | `--fallback copilot`: Copilot answers when Foundry rate-limits, errors or times out, and finishes a Claude Code turn on an OpenAI deployment whose stream fails before any output; then traffic moves back to Foundry |
67
68
  | **Web search** | Optional web search for Claude Code and Codex sessions, via **Tavily and/or Exa** with automatic failover |
68
69
  | **Image generation & editing** | OpenAI **Images API** on Copilot's **GPT Image 2.5 Flare**: text-to-image, edits and multi-image composition, exact text rendering, transparent PNGs — see [Image Generation](#image-generation) |
70
+ | **Decision models** | OpenAI **Decisions API** (`/v1/decisions`) on Copilot's **GPT-6 Luna Decisions**: yes/no, choice and score questions about text and images, each answer with a probability — see [Decision Models](#decision-models) |
69
71
  | **Dual API compatibility** | OpenAI Chat Completions, Anthropic Messages, and OpenAI Responses APIs side by side |
70
72
  | **HTTPS with auto-generated certs** | Self-signed TLS certs with configurable SANs -- works across VMs, containers, and LAN |
71
73
  | **Zero configuration** | Single command to start -- authenticates via GitHub device-code OAuth |
@@ -220,6 +222,26 @@ Good to know:
220
222
  - `gpt-image-2.5-flare` works only on the Images endpoints, not on Chat Completions or Responses. Streaming (`stream: true`) is not supported by Copilot yet.
221
223
  - Edit uploads are limited to 100 MB per request. Image endpoints are Copilot-only (not available with `--provider foundry`).
222
224
 
225
+ ### Decision Models
226
+
227
+ Copilot also serves a decision model, **GPT-6 Luna Decisions** (`gpt-6-luna-decisions`). It does not write text. It answers `predicate` (yes/no), `choice` and `score` questions about your input and returns a probability for each answer. The proxy exposes it through the **OpenAI Decisions API** (`POST /v1/decisions`). The request goes to Copilot unchanged, so the [OpenAI Decisions guide](https://developers.openai.com/api/docs/guides/decisions) applies, with one change: the guide examples use `"model": "gpt-6-luna"`, but on Copilot that name is a chat model and `/v1/decisions` rejects it with `model_not_supported`. Send `"model": "gpt-6-luna-decisions"`. The decision model does not work on `/v1/chat/completions`, `/v1/responses` or `/v1/messages`.
228
+
229
+ ```bash
230
+ curl -s http://localhost:4141/v1/decisions \
231
+ -H "Content-Type: application/json" \
232
+ -d '{
233
+ "model": "gpt-6-luna-decisions",
234
+ "input": "I was charged twice for my order.",
235
+ "questions": [
236
+ {"type": "choice", "name": "department", "instructions": "Which team should handle this?",
237
+ "choices": [{"value": "billing"}, {"value": "technical"}]},
238
+ {"type": "predicate", "name": "angry", "instructions": "Is the customer angry?"}
239
+ ]
240
+ }'
241
+ # {"answers":[{"type":"choice","name":"department","choice":"billing","confidence":1,...},
242
+ # {"type":"predicate","name":"angry","probability":0.42}],"usage":{...}}
243
+ ```
244
+
223
245
  ### Claude Cowork
224
246
 
225
247
  Use Claude's desktop app ([Cowork](https://claude.ai/desktop)) with your Copilot subscription. Requires [Tailscale](https://tailscale.com) (free for personal use) for a real Let's Encrypt TLS certificate — no self-signed cert headaches.
@@ -330,6 +352,8 @@ All endpoints are served at `http://localhost:4141` by default (`https://` when
330
352
  | `POST` | `/v1/images/generations` | OpenAI Images: generate (for example `gpt-image-2.5-flare`) |
331
353
  | `POST` | `/v1/images/edits` | OpenAI Images: edit (multipart/form-data, 100 MB body limit) |
332
354
  | `POST` | `/images/generations`, `/images/edits` | OpenAI Images without the `/v1` prefix |
355
+ | `POST` | `/v1/decisions` | OpenAI Decisions API (for example `gpt-6-luna-decisions`) |
356
+ | `POST` | `/decisions` | OpenAI Decisions API without the `/v1` prefix |
333
357
  | `GET` | `/v1/models` | OpenAI Models |
334
358
  | `GET` | `/models` | OpenAI Models without the `/v1` prefix |
335
359
  | `GET` | `/usage` | GitHub Copilot usage and quota information |