cascade-ai 0.69.0 → 0.71.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 +35 -0
- package/dist/cli.cjs +205 -340
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +205 -340
- package/dist/cli.js.map +1 -1
- package/dist/desktop-core.cjs +164 -294
- package/dist/index.cjs +164 -294
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +45 -15
- package/dist/index.d.ts +45 -15
- package/dist/index.js +164 -292
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -43,6 +43,8 @@ Other AI CLIs run a single agent. Cascade runs a visible **organization** — an
|
|
|
43
43
|
- [Features](#features)
|
|
44
44
|
- [Installation](#installation)
|
|
45
45
|
- [Quick Start](#quick-start)
|
|
46
|
+
- [Self-host](#self-host)
|
|
47
|
+
- [OpenAI-compatible API](#openai-compatible-api)
|
|
46
48
|
- [Configuration](#configuration)
|
|
47
49
|
- [AI Providers](#ai-providers)
|
|
48
50
|
- [Tools](#tools)
|
|
@@ -246,6 +248,39 @@ See the [Dockerfile](Dockerfile) and [docker-compose.yml](docker-compose.yml) fo
|
|
|
246
248
|
|
|
247
249
|
---
|
|
248
250
|
|
|
251
|
+
## OpenAI-compatible API
|
|
252
|
+
|
|
253
|
+
Anything that already talks to OpenAI can talk to Cascade. Point the client's `base_url` at your server's `/v1` and use a Cascade access token as the API key — `POST /v1/chat/completions` and `GET /v1/models` work with the official SDKs, streaming and not.
|
|
254
|
+
|
|
255
|
+
```python
|
|
256
|
+
from openai import OpenAI
|
|
257
|
+
|
|
258
|
+
client = OpenAI(api_key=CASCADE_ACCESS_TOKEN, base_url="http://localhost:8787/v1")
|
|
259
|
+
|
|
260
|
+
reply = client.chat.completions.create(
|
|
261
|
+
model="cascade", # a routing mode, not a model
|
|
262
|
+
messages=[{"role": "user", "content": "Compare Postgres and SQLite for a CLI tool."}],
|
|
263
|
+
)
|
|
264
|
+
print(reply.choices[0].message.content)
|
|
265
|
+
print(reply.cascade) # which tier + model actually served it, and what routing saved
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
`model` names a **routing mode**, because Cascade picks a model per subtask — that is the product:
|
|
269
|
+
|
|
270
|
+
| `model` | what runs |
|
|
271
|
+
| --- | --- |
|
|
272
|
+
| `cascade` | full orchestration, balanced quality against cost |
|
|
273
|
+
| `cascade-fast` | one mid-tier model, no orchestration |
|
|
274
|
+
| `cascade-quality` | full orchestration, biased to quality |
|
|
275
|
+
|
|
276
|
+
Anything else returns `404 model_not_found` rather than quietly running something you didn't ask for. Unsupported parameters (`n > 1`, `logprobs`, `tools`, `response_format`, …) are **rejected**, not ignored — a silently dropped parameter returns a response that looks successful and is wrong. `temperature` and `max_tokens` are honoured, applied across tiers.
|
|
277
|
+
|
|
278
|
+
**Provider keys.** On a **single-account** instance — a self-host, where the operator and the caller are the same person — the endpoint uses the provider keys in your `.env` (`OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, …; the same names the CLI reads). The moment a second account exists this stops automatically, because the operator's key would otherwise pay for everyone else's runs. Any instance can also take keys per request via the SDK's `extra_body={"providers": [...]}`.
|
|
279
|
+
|
|
280
|
+
`/v1` is for server-side clients: `Authorization` is not allowed cross-origin, so a browser-side SDK is deliberately not served. Tools/function calling and image inputs are not in v1 — Cascade's tools run server-side, and attachments go through `POST /api/uploads`.
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
249
284
|
## Configuration
|
|
250
285
|
|
|
251
286
|
Cascade loads config from `.cascade/config.json` in your project directory.
|