llmshim 0.3.6 → 0.4.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 +8 -8
- package/dist/types.d.ts +92 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -24,14 +24,14 @@ const client = new Client(); // no baseUrl -> auto-starts the bundled proxy on f
|
|
|
24
24
|
|
|
25
25
|
// Non-streaming
|
|
26
26
|
const res = await client.chat({
|
|
27
|
-
model: "anthropic/claude-sonnet-
|
|
27
|
+
model: "anthropic/claude-sonnet-5",
|
|
28
28
|
messages: [{ role: "user", content: "What is Rust in one sentence?" }],
|
|
29
29
|
});
|
|
30
30
|
console.log(res.message.content);
|
|
31
31
|
|
|
32
32
|
// Streaming — an async iterator of typed events
|
|
33
33
|
for await (const ev of client.stream({
|
|
34
|
-
model: "gpt-5.
|
|
34
|
+
model: "gpt-5.6-sol",
|
|
35
35
|
messages: [{ role: "user", content: "Write a haiku about the ocean." }],
|
|
36
36
|
})) {
|
|
37
37
|
if (ev.type === "reasoning") process.stdout.write(`\x1b[2m${ev.text}\x1b[0m`);
|
|
@@ -54,9 +54,9 @@ reads its own credentials from the environment (or `llmshim configure`):
|
|
|
54
54
|
| ---------- | -------------------------------------------------- | ------------------------------------------------- |
|
|
55
55
|
| OpenAI | `openai/gpt-5.6-sol` | `OPENAI_API_KEY` |
|
|
56
56
|
| Anthropic | `anthropic/claude-sonnet-5` | `ANTHROPIC_API_KEY` |
|
|
57
|
-
| Gemini | `gemini/gemini-3.
|
|
58
|
-
| xAI | `xai/grok-4.
|
|
59
|
-
| OpenRouter | `openrouter/anthropic/claude-sonnet-
|
|
57
|
+
| Gemini | `gemini/gemini-3.8-flash` | `GEMINI_API_KEY` |
|
|
58
|
+
| xAI | `xai/grok-4.6` | `XAI_API_KEY` |
|
|
59
|
+
| OpenRouter | `openrouter/anthropic/claude-sonnet-5` | `OPENROUTER_API_KEY` |
|
|
60
60
|
| vLLM | `vllm/<served-model>` | `VLLM_BASE_URL` (+ optional `VLLM_API_KEY`) |
|
|
61
61
|
| SGLang | `sglang/<served-model>` | `SGLANG_BASE_URL` (+ optional `SGLANG_API_KEY`) |
|
|
62
62
|
|
|
@@ -96,7 +96,7 @@ An ordered list tried in turn on retryable upstream failures (429/5xx):
|
|
|
96
96
|
await client.chat({
|
|
97
97
|
model: "anthropic/claude-sonnet-5",
|
|
98
98
|
messages: [{ role: "user", content: "Hi" }],
|
|
99
|
-
fallback: ["openai/gpt-5.6-sol", "gemini/gemini-3.
|
|
99
|
+
fallback: ["openai/gpt-5.6-sol", "gemini/gemini-3.8-flash"],
|
|
100
100
|
});
|
|
101
101
|
```
|
|
102
102
|
|
|
@@ -113,13 +113,13 @@ await client.chat({
|
|
|
113
113
|
model: "anthropic/claude-sonnet-5",
|
|
114
114
|
messages: [{ role: "user", content: "Think hard about this." }],
|
|
115
115
|
provider_config: {
|
|
116
|
-
"x-anthropic": { thinking: { type: "
|
|
116
|
+
"x-anthropic": { thinking: { type: "adaptive" }, output_config: { effort: "high" } },
|
|
117
117
|
},
|
|
118
118
|
});
|
|
119
119
|
|
|
120
120
|
// OpenRouter routing preferences, for example:
|
|
121
121
|
await client.chat({
|
|
122
|
-
model: "openrouter/anthropic/claude-sonnet-
|
|
122
|
+
model: "openrouter/anthropic/claude-sonnet-5",
|
|
123
123
|
messages: [{ role: "user", content: "Hi" }],
|
|
124
124
|
provider_config: {
|
|
125
125
|
"x-openrouter": { provider: { sort: "throughput" } }, // also: models, transforms
|
package/dist/types.d.ts
CHANGED
|
@@ -11,8 +11,48 @@ export type ReasoningEffort = "none" | "low" | "medium" | "high" | "xhigh" | "ma
|
|
|
11
11
|
export type ReasoningMode = "standard" | "pro";
|
|
12
12
|
/** Role of a conversation message. */
|
|
13
13
|
export type Role = "system" | "user" | "assistant" | "tool" | "developer";
|
|
14
|
+
/** Provenance recorded when a reasoning block was received. */
|
|
15
|
+
export interface ReasoningOrigin {
|
|
16
|
+
provider: string;
|
|
17
|
+
model: string;
|
|
18
|
+
family: string | null;
|
|
19
|
+
wire: "anthropic-messages" | "openai-responses" | "openai-chat" | "google-generate-content";
|
|
20
|
+
received_at: string;
|
|
21
|
+
account?: string;
|
|
22
|
+
}
|
|
23
|
+
/** Preserve the complete object when recording or replaying a conversation. */
|
|
24
|
+
export interface ReasoningBlock {
|
|
25
|
+
kind: "text" | "redacted" | "encrypted";
|
|
26
|
+
text?: string;
|
|
27
|
+
data?: string;
|
|
28
|
+
signature?: string;
|
|
29
|
+
item_id?: string;
|
|
30
|
+
origin: ReasoningOrigin;
|
|
31
|
+
payload?: unknown;
|
|
32
|
+
source_field?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface ReasoningDelta extends ReasoningBlock {
|
|
35
|
+
index?: number | string;
|
|
36
|
+
replace?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface ThoughtSignature {
|
|
39
|
+
data: string;
|
|
40
|
+
origin: ReasoningOrigin;
|
|
41
|
+
}
|
|
42
|
+
/** Persist this mapping with the call; id is the wire correlation id. */
|
|
43
|
+
export interface WireToolId {
|
|
44
|
+
signature_field?: string;
|
|
45
|
+
provider: string;
|
|
46
|
+
wire: ReasoningOrigin["wire"];
|
|
47
|
+
scope: string;
|
|
48
|
+
part_id: string;
|
|
49
|
+
id: string | null;
|
|
50
|
+
item_id?: string;
|
|
51
|
+
}
|
|
14
52
|
/** A tool call made by the assistant. */
|
|
15
53
|
export interface ToolCall {
|
|
54
|
+
wire_ids?: WireToolId[];
|
|
55
|
+
thought_signature?: ThoughtSignature;
|
|
16
56
|
id?: string;
|
|
17
57
|
type?: "function";
|
|
18
58
|
function?: {
|
|
@@ -30,9 +70,10 @@ export interface Message {
|
|
|
30
70
|
tool_call_id?: string;
|
|
31
71
|
/** Tool calls made by the assistant. */
|
|
32
72
|
tool_calls?: ToolCall[];
|
|
73
|
+
reasoning?: ReasoningBlock[];
|
|
33
74
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
75
|
+
* @deprecated Legacy input only. Untracked reasoning is dropped; preserve
|
|
76
|
+
* the full reasoning array from the previous assistant message instead.
|
|
36
77
|
*/
|
|
37
78
|
reasoning_content?: string;
|
|
38
79
|
}
|
|
@@ -54,8 +95,35 @@ export interface Config {
|
|
|
54
95
|
/** Unified reasoning mode; see {@link ReasoningMode}. Default "standard". */
|
|
55
96
|
reasoning_mode?: ReasoningMode;
|
|
56
97
|
}
|
|
98
|
+
export interface CacheSegment {
|
|
99
|
+
upto_message: number;
|
|
100
|
+
label?: string;
|
|
101
|
+
stability: "static" | "session" | "turn";
|
|
102
|
+
}
|
|
103
|
+
export interface CachePolicy {
|
|
104
|
+
segments?: CacheSegment[];
|
|
105
|
+
key?: string;
|
|
106
|
+
}
|
|
107
|
+
export interface ShimConfig {
|
|
108
|
+
structured_output?: "auto" | "native" | "forced_tool" | "prompt";
|
|
109
|
+
tool_calling?: "auto" | "native" | "prompt";
|
|
110
|
+
reasoning_capture?: "off" | "forced_tool";
|
|
111
|
+
}
|
|
112
|
+
export type ResponseFormat = {
|
|
113
|
+
type: "json_schema";
|
|
114
|
+
json_schema: {
|
|
115
|
+
name?: string;
|
|
116
|
+
schema: unknown;
|
|
117
|
+
strict?: boolean;
|
|
118
|
+
};
|
|
119
|
+
} | {
|
|
120
|
+
type: "json_object";
|
|
121
|
+
};
|
|
57
122
|
/** Request body for POST /v1/chat and POST /v1/chat/stream. */
|
|
58
123
|
export interface ChatRequest {
|
|
124
|
+
"x-cache"?: CachePolicy;
|
|
125
|
+
"x-shim"?: ShimConfig;
|
|
126
|
+
response_format?: ResponseFormat;
|
|
59
127
|
/**
|
|
60
128
|
* Model identifier. Use "provider/model" (e.g. "anthropic/claude-sonnet-4-6")
|
|
61
129
|
* or just the model name for auto-detection (e.g. "claude-sonnet-4-6").
|
|
@@ -79,9 +147,13 @@ export interface Usage {
|
|
|
79
147
|
/** Reasoning/thinking tokens used (omitted when zero). */
|
|
80
148
|
reasoning_tokens?: number;
|
|
81
149
|
total_tokens: number;
|
|
150
|
+
/** Cache input tokens (absent on servers older than 0.4). */
|
|
151
|
+
cache_read_tokens?: number;
|
|
152
|
+
cache_write_tokens?: number;
|
|
82
153
|
}
|
|
83
154
|
/** The assistant message inside a ChatResponse. */
|
|
84
155
|
export interface ResponseMessage {
|
|
156
|
+
refusal?: string;
|
|
85
157
|
role: string;
|
|
86
158
|
/**
|
|
87
159
|
* Assistant content — a string for plain text, or an array of content
|
|
@@ -89,9 +161,12 @@ export interface ResponseMessage {
|
|
|
89
161
|
*/
|
|
90
162
|
content: unknown;
|
|
91
163
|
tool_calls?: ToolCall[];
|
|
164
|
+
reasoning?: ReasoningBlock[];
|
|
92
165
|
}
|
|
93
166
|
/** Response body from POST /v1/chat (non-streaming). */
|
|
94
167
|
export interface ChatResponse {
|
|
168
|
+
finish_reason?: string;
|
|
169
|
+
"x-llmshim-served-model"?: string;
|
|
95
170
|
/** Response ID from the provider. */
|
|
96
171
|
id: string;
|
|
97
172
|
model: string;
|
|
@@ -111,11 +186,14 @@ export interface ContentEvent {
|
|
|
111
186
|
}
|
|
112
187
|
/** A chunk of reasoning/thinking text. */
|
|
113
188
|
export interface ReasoningEvent {
|
|
189
|
+
blocks?: ReasoningDelta[];
|
|
114
190
|
type: "reasoning";
|
|
115
191
|
text: string;
|
|
116
192
|
}
|
|
117
193
|
/** A tool call emitted during streaming. */
|
|
118
194
|
export interface ToolCallEvent {
|
|
195
|
+
wire_ids?: WireToolId[];
|
|
196
|
+
thought_signature?: ThoughtSignature;
|
|
119
197
|
type: "tool_call";
|
|
120
198
|
id: string;
|
|
121
199
|
name: string;
|
|
@@ -130,15 +208,27 @@ export interface UsageEvent {
|
|
|
130
208
|
/** Reasoning/thinking tokens used (omitted when zero). */
|
|
131
209
|
reasoning_tokens?: number;
|
|
132
210
|
total_tokens: number;
|
|
211
|
+
/** Cache input tokens (absent on servers older than 0.4). */
|
|
212
|
+
cache_read_tokens?: number;
|
|
213
|
+
cache_write_tokens?: number;
|
|
133
214
|
}
|
|
134
215
|
/** Terminal event signalling the stream is complete. */
|
|
135
216
|
export interface DoneEvent {
|
|
217
|
+
finish_reason?: string;
|
|
218
|
+
"x-llmshim-served-model"?: string;
|
|
136
219
|
type: "done";
|
|
137
220
|
}
|
|
138
221
|
/** An error surfaced mid-stream. */
|
|
139
222
|
export interface ErrorEvent {
|
|
140
223
|
type: "error";
|
|
141
224
|
message: string;
|
|
225
|
+
error?: {
|
|
226
|
+
message: string;
|
|
227
|
+
type?: string;
|
|
228
|
+
code: unknown;
|
|
229
|
+
param: unknown;
|
|
230
|
+
status?: number;
|
|
231
|
+
};
|
|
142
232
|
}
|
|
143
233
|
/** Discriminated union of all SSE events emitted during streaming. */
|
|
144
234
|
export type StreamEvent = ContentEvent | ReasoningEvent | ToolCallEvent | UsageEvent | DoneEvent | ErrorEvent;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,8DAA8D;AAC9D,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC;AAEnF;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,KAAK,CAAC;AAE/C,sCAAsC;AACtC,MAAM,MAAM,IAAI,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,GAAG,WAAW,CAAC;AAE1E,yCAAyC;AACzC,MAAM,WAAW,QAAQ;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,QAAQ,CAAC,EAAE;QACT,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,8BAA8B;QAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED,gDAAgD;AAChD,M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GACV,SAAS,GACT,UAAU,CAAC;AAEf,iDAAiD;AACjD,MAAM,WAAW,SAAS;IACxB,6CAA6C;IAC7C,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;CACd;AAED,yCAAyC;AACzC,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAED,sCAAsC;AACtC,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,oDAAoD;AACpD,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "llmshim",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "TypeScript client for the llmshim proxy (multi-provider LLM API) \u2014 bundles a prebuilt binary and auto-starts it, or connects to a proxy you run yourself.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"node": ">=18"
|
|
21
21
|
},
|
|
22
22
|
"optionalDependencies": {
|
|
23
|
-
"llmshim-darwin-arm64": "0.
|
|
24
|
-
"llmshim-darwin-x64": "0.
|
|
25
|
-
"llmshim-linux-x64": "0.
|
|
26
|
-
"llmshim-linux-arm64": "0.
|
|
27
|
-
"@sanjay920/llmshim-win32-x64": "0.
|
|
23
|
+
"llmshim-darwin-arm64": "0.4.0",
|
|
24
|
+
"llmshim-darwin-x64": "0.4.0",
|
|
25
|
+
"llmshim-linux-x64": "0.4.0",
|
|
26
|
+
"llmshim-linux-arm64": "0.4.0",
|
|
27
|
+
"@sanjay920/llmshim-win32-x64": "0.4.0"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"build": "tsc -p tsconfig.json",
|