@mupt-ai/dari-gateway 0.3.5 → 1.0.290

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.
Files changed (2) hide show
  1. package/README.md +9 -12
  2. package/package.json +4 -3
package/README.md CHANGED
@@ -30,15 +30,15 @@ The gateway is the runtime behind Dari's hosted routing service, packaged to run
30
30
  - **Subscription pooling.** Connect several Claude Code (Max/Pro) or ChatGPT plans. The gateway stays on one until it reports a usage limit, holds it until its reset, and moves to the next. When every plan is held, the provider's API key serves if you set one.
31
31
  - **Failover.** A provider failure retries the router's next model.
32
32
  - **Prompt-cache aware.** Conversations keep their identity and serving model across turns, so provider caches stay warm. Responses carry `X-Dari-Selected-Model`, `X-Dari-Thinking-Level`, and `X-Dari-Conversation-Id` headers for status lines.
33
- - **Coding agents.** `dari claude`, `dari codex`, `dari opencode`, and `dari pi` from the [Dari CLI](https://github.com/mupt-ai/dari-cli) launch straight against your gateway.
33
+ - **Coding agents.** `dari claude`, `dari codex`, `dari opencode`, and `dari pi` from the [Dari CLI](https://github.com/mupt-ai/dari) launch straight against your gateway.
34
34
 
35
35
  The gateway is the same runtime that serves Dari's hosted routing service. Choosing among a router's models with Dari's trained routing policy (Dari Auto Routing) is optional and uses a Dari API key; without it, `dari/routing` serves the router's first available model.
36
36
 
37
37
  ## Run
38
38
 
39
- The easiest way to run it on your own machine is the [Dari CLI](https://github.com/mupt-ai/dari-cli): choose **Fully local** in `dari gateway setup` (or on your first `dari claude`), and it installs this gateway's standalone binary, runs it in the background, and connects your agents.
39
+ The easiest way to run it on your own machine is the [Dari CLI](https://github.com/mupt-ai/dari): choose **Fully local** in `dari gateway setup` (or on your first `dari claude`), and it installs this gateway's standalone binary, runs it in the background, and connects your agents.
40
40
 
41
- To run it yourself, use [Bun](https://bun.sh) 1.3 or later, or the standalone binary for your platform from the [releases](https://github.com/mupt-ai/dari-gateway/releases). A config file is optional: without `DARI_GATEWAY_CONFIG` or a `dari-gateway.yaml` in the working directory, the gateway serves a default router of current Anthropic and OpenAI models, each once its provider has a subscription or API key. To choose models, write a `dari-gateway.yaml` (start from [`dari-gateway.example.yaml`](dari-gateway.example.yaml)). Then:
41
+ To run it yourself, use [Bun](https://bun.sh) 1.3 or later, or the standalone binary for your platform from the [releases](https://github.com/mupt-ai/dari/releases). A config file is optional: without `DARI_GATEWAY_CONFIG` or a `dari-gateway.yaml` in the working directory, the gateway serves a default router of current Anthropic and OpenAI models, each once its provider has a subscription or API key. To choose models, write a `dari-gateway.yaml` (start from [`dari-gateway.example.yaml`](dari-gateway.example.yaml)). Then:
42
42
 
43
43
  ```bash
44
44
  export DARI_GATEWAY_KEYS="$(openssl rand -hex 24)" # keys your clients send
@@ -56,7 +56,7 @@ docker run -p 8080:8080 \
56
56
  ghcr.io/mupt-ai/dari-gateway
57
57
  ```
58
58
 
59
- From a clone, `bun install && bun run start` or `docker build -t dari-gateway .` run the same thing.
59
+ From a clone of [mupt-ai/dari](https://github.com/mupt-ai/dari), `bun install && (cd packages/router && bun run build) && (cd packages/gateway && bun run start)` or `docker build -f packages/gateway/Dockerfile -t dari-gateway .` run the same thing.
60
60
 
61
61
  | Variable | Meaning |
62
62
  | --- | --- |
@@ -129,19 +129,16 @@ Platforms can also:
129
129
 
130
130
  ## Development
131
131
 
132
+ The gateway and router share one workspace at the repository root, so the gateway always runs on the router beside it:
133
+
132
134
  ```bash
133
- bun install --frozen-lockfile
135
+ bun install --frozen-lockfile # from the repository root
136
+ (cd packages/router && bun run build)
137
+ cd packages/gateway
134
138
  bun run typecheck
135
139
  bun test
136
140
  ```
137
141
 
138
- This package depends on the published `@mupt-ai/dari-router`. To test against a local router checkout inside the monorepo, build it and link it after installing:
139
-
140
- ```bash
141
- (cd ../dari-router && bun install --frozen-lockfile && bun run build)
142
- ../scripts/link-gateway-router.sh
143
- ```
144
-
145
142
  Tests make no provider or network calls.
146
143
 
147
144
  ## License
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@mupt-ai/dari-gateway",
3
- "version": "0.3.5",
3
+ "version": "1.0.290",
4
4
  "description": "Self-hostable LLM gateway for coding agents and APIs: one endpoint for Anthropic Messages, OpenAI Chat Completions, and OpenAI Responses, with subscription pooling, failover, and prompt-cache-aware routing.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "git+https://github.com/mupt-ai/dari-gateway.git"
8
+ "url": "git+https://github.com/mupt-ai/dari.git",
9
+ "directory": "packages/gateway"
9
10
  },
10
11
  "type": "module",
11
12
  "exports": {
@@ -50,7 +51,7 @@
50
51
  },
51
52
  "dependencies": {
52
53
  "@aws-sdk/client-sts": "3.1063.0",
53
- "@mupt-ai/dari-router": "0.2.5",
54
+ "@mupt-ai/dari-router": "1.0.290",
54
55
  "@mupt-ai/pi-ai": "1.4.0-mupt.3"
55
56
  },
56
57
  "devDependencies": {