@aalis/api-llm 0.9.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ace Nyan <ace@acenyan.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # @aalis/api-llm
2
+
3
+ 类型/接口/能力声明包(只导出 `type` 与 `*Capabilities`,不含运行时逻辑)
4
+
5
+ ## 角色
6
+
7
+ 类型/接口/能力声明包(只导出 `type` 与 `*Capabilities`,不含运行时逻辑)
8
+
9
+ ## 安装
10
+
11
+ ```bash
12
+ pnpm add @aalis/api-llm
13
+ ```
14
+
15
+ ## 使用
16
+
17
+ ```ts
18
+ import type { /* ... */ } from '@aalis/api-llm';
19
+ ```
20
+
21
+ 本包为 *-api 类型包;实现见对应的运行时插件。
22
+
23
+ ## 许可
24
+
25
+ 见仓库根目录 LICENSE。
@@ -0,0 +1,196 @@
1
+ import type { ToolDefinition } from '@aalis/api-tools';
2
+ import type { Context } from '@aalis/core';
3
+ import type { Message, ToolCall } from '@aalis/schema-message';
4
+ export interface ChatResponse {
5
+ content: string | null;
6
+ toolCalls?: ToolCall[];
7
+ reasoningContent?: string | null;
8
+ usage?: {
9
+ promptTokens: number;
10
+ completionTokens: number;
11
+ totalTokens: number;
12
+ /**
13
+ * promptTokens 中由 provider 前缀缓存命中的部分(≤ promptTokens)。
14
+ *
15
+ * 计费意义:命中部分通常远低于常规输入价(DeepSeek 上下文缓存约 1/10)。
16
+ * 不支持或本次无命中的 provider 省略此字段——`undefined` 表示"不可知",
17
+ * 与 `0`(明确无命中)语义不同,消费方不要用 `?? 0` 抹平二者。
18
+ */
19
+ cachedPromptTokens?: number;
20
+ };
21
+ }
22
+ /**
23
+ * 工具调用增量进度(非完整 ToolCall,仅用于 UI 提示「正在生成」)。
24
+ * Provider 在每收到 tool_call 的 SSE delta 时 yield 一个 chunk,
25
+ * 让上层可以渲染进度条而不必等整段 tool_calls 累积完。
26
+ */
27
+ export interface ToolCallProgress {
28
+ /** 工具调用在本轮中的索引(OpenAI 协议里的 tool_calls[i].index) */
29
+ index: number;
30
+ /** 当前已确定的函数名(首个 delta 之后即可获得) */
31
+ name: string;
32
+ /** 已累积的 arguments JSON 字符数(不含 name),用于显示进度 */
33
+ charsAccumulated: number;
34
+ }
35
+ export interface ChatStreamChunk {
36
+ contentDelta?: string;
37
+ reasoningDelta?: string;
38
+ toolCalls?: ToolCall[];
39
+ /** 工具调用生成进度(与 toolCalls 互斥:前者是增量提示,后者是最终结果) */
40
+ toolCallProgress?: ToolCallProgress;
41
+ done?: boolean;
42
+ usage?: {
43
+ promptTokens: number;
44
+ completionTokens: number;
45
+ totalTokens: number;
46
+ /** 见 {@link ChatResponse.usage.cachedPromptTokens} */
47
+ cachedPromptTokens?: number;
48
+ };
49
+ }
50
+ export interface ModelInfo {
51
+ id: string;
52
+ /**
53
+ * Capability 字符串数组。注册时来自 ServiceContainer,因此使用宽松的 string[]
54
+ * 而不是 LLMCapability[],便于跨插件共享(自定义 capability 也能照常上送给前端)。
55
+ */
56
+ capabilities: string[];
57
+ provider?: string;
58
+ contextId?: string;
59
+ contextLength?: number;
60
+ }
61
+ /** Per-model chat request:不再含 model/provider —— entry 已绑定。 */
62
+ export interface ChatModelRequest {
63
+ messages: Message[];
64
+ tools?: ToolDefinition[];
65
+ temperature?: number;
66
+ maxTokens?: number;
67
+ signal?: AbortSignal;
68
+ think?: boolean;
69
+ }
70
+ /**
71
+ * 单个 LLM model 的 service entry。
72
+ *
73
+ * 一个 LLM provider 插件实例(如 plugin-llm-openai)会按其 listModels() 结果
74
+ * 在 apply() 期间为**每个 model 单独**调用 `ctx.provide('llm', modelHandle, {...})`,
75
+ * model handle 上的 capabilities 字段诚实地反映该 model 的能力。
76
+ *
77
+ * 调用约定:
78
+ * const handle = resolveLLMModel(ctx, ref, ['vision'])?.instance;
79
+ * await handle?.chat({ messages }); // entry 已知道是哪个 model
80
+ *
81
+ * 选择 default model:通过 ServiceContainer.setPreference('llm', preferredContextId)
82
+ * 或 persona.yaml 的 defaultServices 配置(见 plugin-author-guide §11)。
83
+ */
84
+ export interface LLMModel {
85
+ /** model id(provider 内唯一,如 'gpt-4o')。来源:provider plugin 注册时填入。 */
86
+ readonly id: string;
87
+ /** 该 model 所属 provider 的 contextId(即 plugin instanceId)。 */
88
+ readonly providerId: string;
89
+ /** 上下文窗口 tokens。用于上层做 prompt 截断决策。 */
90
+ readonly contextLength: number;
91
+ /**
92
+ * Provider 建议的最大输出 token(per-model 上限提示)。可选。
93
+ * Agent 用于计算 tokenBudget 预留:`tokenBudget ≈ contextLength - maxOutputTokens - safetyMargin`。
94
+ * 调用方未在 ChatModelRequest 显式指定时,Provider 会以此为默认。
95
+ */
96
+ readonly maxOutputTokens?: number;
97
+ /**
98
+ * 该 model 的能力元数据(chat/vision/tool_calling/audio/video…)。
99
+ * 这是「模型能干啥」的领域数据——供 media 发现可处理图/音/视的模型、前端下拉展示与过滤用,
100
+ * **不是** DI 选择机制(服务选择一律走配置 + 按名解析)。provider 注册时填。
101
+ */
102
+ readonly capabilities: readonly LLMCapability[];
103
+ chat(request: ChatModelRequest): Promise<ChatResponse>;
104
+ chatStream?(request: ChatModelRequest): AsyncIterable<ChatStreamChunk>;
105
+ /**
106
+ * 让管理面板(webui)触发该 provider 重新探测远端模型列表并 diff 当前已注册 entries。
107
+ *
108
+ * - **远端动态发现型** provider(Ollama / OpenAI)应实现:重新拉取 `/v1/models` 等
109
+ * 并合并 `customModels`、按 model id 增删 `'llm'` entries。
110
+ * - **静态契约型** provider(如 DeepSeek 单 model)可不实现:webui 端检测到无 refresh
111
+ * 就不显示"刷新"按钮。
112
+ * - 同一 provider 下所有 model entries 共享同一份 refresh 闭包;webui 按 contextId
113
+ * 找到任一 entry 调一次即可。
114
+ */
115
+ refresh?(): Promise<{
116
+ added: string[];
117
+ removed: string[];
118
+ total: number;
119
+ }>;
120
+ }
121
+ export interface LLMCapabilityRegistry {
122
+ Chat: 'chat';
123
+ ToolCalling: 'tool_calling';
124
+ Streaming: 'streaming';
125
+ Vision: 'vision';
126
+ Thinking: 'thinking';
127
+ /** 原生音频理解(能接收音频输入,返回描述/问答,如 Gemini / GPT-4o-audio / Gemma 4 E系列) */
128
+ Audio: 'audio';
129
+ /** 专门的语音转文本能力(如 Whisper API)。与 Audio 互独立。 */
130
+ AudioTranscription: 'audio_transcription';
131
+ /** 原生视频理解(能接收视频 bytes,如 Gemini)。OpenAI Vision 是逐帧,不在此列。 */
132
+ Video: 'video';
133
+ }
134
+ export type LLMCapability = LLMCapabilityRegistry[keyof LLMCapabilityRegistry];
135
+ export declare const LLMCapabilities: {
136
+ readonly Chat: "chat";
137
+ readonly ToolCalling: "tool_calling";
138
+ readonly Streaming: "streaming";
139
+ readonly Vision: "vision";
140
+ readonly Thinking: "thinking";
141
+ readonly Audio: "audio";
142
+ readonly AudioTranscription: "audio_transcription";
143
+ readonly Video: "video";
144
+ };
145
+ declare module '@aalis/schema-config' {
146
+ interface SchemaFieldTypes {
147
+ /**
148
+ * LLM 模型引用:值形如 `{ provider: string; model: string }`,前端渲染为
149
+ * 联动 select(provider 列表来自 `/api/models/llm` 的 contextId 聚合;
150
+ * model 列表由所选 provider 决定)。运行时由消费方用
151
+ * `resolveLLMModel(ctx, value, caps)` 解析。
152
+ */
153
+ 'llm-ref': true;
154
+ }
155
+ }
156
+ /** ServiceContainer 中一个 'llm' entry 的完整快照(与 ctx.getAllServices 返回的形状一致)。 */
157
+ export interface LLMModelEntry {
158
+ instance: LLMModel;
159
+ contextId: string;
160
+ label?: string;
161
+ }
162
+ /**
163
+ * LLM model 引用:`{ provider, model }` 二元组。
164
+ * 由 ConfigSchema type='llm-ref' 字段统一编辑,YAML 中以嵌套对象形式存储。
165
+ */
166
+ export interface ModelRef {
167
+ /** provider 的 contextId(plugin instanceId,如 `@aalis/plugin-llm-openai:main`)。 */
168
+ provider?: string;
169
+ /** model id(provider 内唯一,如 `gpt-4o`)。 */
170
+ model?: string;
171
+ }
172
+ /**
173
+ * 列出(可按能力过滤的)LLM model entries,供 `/model` 列表与前端下拉用。
174
+ * 能力源为 `instance.capabilities`(model 自带元数据),是展示/列举用途,非 DI 选择。
175
+ */
176
+ export declare function listLLMModels(ctx: Context, opts?: {
177
+ caps?: readonly LLMCapability[];
178
+ }): LLMModelEntry[];
179
+ /**
180
+ * 把 ref 解析为最匹配的 LLMModel entry。
181
+ *
182
+ * 解析顺序(命中即返回):
183
+ * 1. ref.provider + ref.model 都有 → 直接拼接 entryId `${provider}/${model}` 查找
184
+ * 2. 仅 ref.provider → 在该 provider 名下 entries 中(按 capability 过滤后)取首个
185
+ * 3. 仅 ref.model → 全局 'llm' entries 按 instance.id 严格匹配
186
+ * 4. 都为空 → 取首个满足 capability 的 entry(preference / priority / 注册顺序)
187
+ *
188
+ * requiredCaps 按 handle 元数据 `instance.capabilities` 过滤。找不到返回 undefined。
189
+ */
190
+ export declare function resolveLLMModel(ctx: Context, ref?: ModelRef | null, requiredCaps?: LLMCapability[]): LLMModelEntry | undefined;
191
+ declare module '@aalis/core' {
192
+ interface ServiceTypeMap {
193
+ llm: LLMModel;
194
+ }
195
+ }
196
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE/D,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,KAAK,CAAC,EAAE;QACN,YAAY,EAAE,MAAM,CAAC;QACrB,gBAAgB,EAAE,MAAM,CAAC;QACzB,WAAW,EAAE,MAAM,CAAC;QACpB;;;;;;WAMG;QACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC7B,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,+CAA+C;IAC/C,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,IAAI,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AO,EACZ,GAAG,CAAC,EAAE,QAAQ,GAAG,IAAI,EACrB,YAAY,CAAC,EAAE,aAAa,EAAE,GAC7B,aAAa,GAAG,SAAS,CAM3B;AAID,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,cAAc;QACtB,GAAG,EAAE,QAAQ,CAAC;KACf;CACF"}
package/dist/index.js ADDED
@@ -0,0 +1,53 @@
1
+ // ----- LLM 服务接口 -----
2
+ //
3
+ // 提供完整的 LLM 抽象 + 能力声明框架。
4
+ // 任何需要调用或实现 LLM 服务的插件都应从本包导入相关类型。
5
+ export const LLMCapabilities = {
6
+ Chat: 'chat',
7
+ ToolCalling: 'tool_calling',
8
+ Streaming: 'streaming',
9
+ Vision: 'vision',
10
+ Thinking: 'thinking',
11
+ Audio: 'audio',
12
+ AudioTranscription: 'audio_transcription',
13
+ Video: 'video',
14
+ };
15
+ /**
16
+ * 按能力过滤 LLM entries —— 能力源为 handle 元数据 `instance.capabilities`,
17
+ * 不再依赖 core 的能力过滤(core 已不做能力选择,服务选择走配置 + 按名解析)。
18
+ */
19
+ function listLLMEntries(ctx, caps) {
20
+ const all = ctx.getAllServices('llm');
21
+ if (!caps || caps.length === 0)
22
+ return all;
23
+ return all.filter(e => caps.every(c => (e.instance.capabilities ?? []).includes(c)));
24
+ }
25
+ /**
26
+ * 列出(可按能力过滤的)LLM model entries,供 `/model` 列表与前端下拉用。
27
+ * 能力源为 `instance.capabilities`(model 自带元数据),是展示/列举用途,非 DI 选择。
28
+ */
29
+ export function listLLMModels(ctx, opts) {
30
+ return listLLMEntries(ctx, opts?.caps);
31
+ }
32
+ /**
33
+ * 把 ref 解析为最匹配的 LLMModel entry。
34
+ *
35
+ * 解析顺序(命中即返回):
36
+ * 1. ref.provider + ref.model 都有 → 直接拼接 entryId `${provider}/${model}` 查找
37
+ * 2. 仅 ref.provider → 在该 provider 名下 entries 中(按 capability 过滤后)取首个
38
+ * 3. 仅 ref.model → 全局 'llm' entries 按 instance.id 严格匹配
39
+ * 4. 都为空 → 取首个满足 capability 的 entry(preference / priority / 注册顺序)
40
+ *
41
+ * requiredCaps 按 handle 元数据 `instance.capabilities` 过滤。找不到返回 undefined。
42
+ */
43
+ export function resolveLLMModel(ctx, ref, requiredCaps) {
44
+ const all = listLLMEntries(ctx, requiredCaps);
45
+ if (ref?.provider && ref?.model)
46
+ return all.find(e => e.contextId === `${ref.provider}/${ref.model}`);
47
+ if (ref?.provider)
48
+ return all.find(e => e.contextId.startsWith(`${ref.provider}/`));
49
+ if (ref?.model)
50
+ return all.find(e => e.instance.id === ref.model);
51
+ return all[0];
52
+ }
53
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uBAAuB;AACvB,EAAE;AACF,yBAAyB;AACzB,kCAAkC;AAyJlC,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,cAAc;IAC3B,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;IACd,kBAAkB,EAAE,qBAAqB;IACzC,KAAK,EAAE,OAAO;CAC0B,CAAC;AAsC3C;;;GAGG;AACH,SAAS,cAAc,CAAC,GAAY,EAAE,IAA+B;IACnE,MAAM,GAAG,GAAG,GAAG,CAAC,cAAc,CAAW,KAAK,CAAC,CAAC;IAChD,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,GAAG,CAAC;IAC3C,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACvF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,GAAY,EAAE,IAA0C;IACpF,OAAO,cAAc,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACzC,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,eAAe,CAC7B,GAAY,EACZ,GAAqB,EACrB,YAA8B;IAE9B,MAAM,GAAG,GAAG,cAAc,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;IAC9C,IAAI,GAAG,EAAE,QAAQ,IAAI,GAAG,EAAE,KAAK;QAAE,OAAO,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,GAAG,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC;IACtG,IAAI,GAAG,EAAE,QAAQ;QAAE,OAAO,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;IACpF,IAAI,GAAG,EAAE,KAAK;QAAE,OAAO,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC;IAClE,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;AAChB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@aalis/api-llm",
3
+ "version": "0.9.0",
4
+ "license": "MIT",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/AalisLabs/Aalis.git",
8
+ "directory": "packages/api-llm"
9
+ },
10
+ "author": "Ace Nyan <ace@acenyan.com>",
11
+ "bugs": {
12
+ "url": "https://github.com/AalisLabs/Aalis/issues"
13
+ },
14
+ "homepage": "https://github.com/AalisLabs/Aalis#readme",
15
+ "type": "module",
16
+ "main": "dist/index.js",
17
+ "types": "dist/index.d.ts",
18
+ "files": [
19
+ "dist"
20
+ ],
21
+ "dependencies": {
22
+ "@aalis/schema-message": ">=0.5.1 <1.0.0",
23
+ "@aalis/api-tools": ">=0.5.1 <1.0.0",
24
+ "@aalis/schema-config": ">=0.9.0 <1.0.0"
25
+ },
26
+ "devDependencies": {
27
+ "@types/node": "^22.0.0",
28
+ "typescript": "^5.7.0",
29
+ "@aalis/core": "0.10.0"
30
+ },
31
+ "aalis": {
32
+ "types": true
33
+ },
34
+ "peerDependencies": {
35
+ "@aalis/core": ">=0.2.0 <1.0.0"
36
+ },
37
+ "keywords": [
38
+ "aalis",
39
+ "aalis-api"
40
+ ],
41
+ "scripts": {
42
+ "build": "tsc",
43
+ "dev": "tsc --watch"
44
+ }
45
+ }