@shenghuabi/openai 1.1.46 → 1.2.1

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.
@@ -0,0 +1,1138 @@
1
+ import * as v from 'valibot';
2
+ import { Model } from '@earendil-works/pi-ai';
3
+ export declare function getModelConfig(input: ModelConfigInputType): {
4
+ model: Model<any>;
5
+ config: ModelConfigOutputType;
6
+ };
7
+ export declare const ThinkingLevelSchema: v.SchemaWithPipe<readonly [v.PicklistSchema<["minimal", "low", "medium", "high", "xhigh"], undefined>, v.TitleAction<"low" | "high" | "minimal" | "medium" | "xhigh", "思考等级">, v.DescriptionAction<"low" | "high" | "minimal" | "medium" | "xhigh", "模型思考的详细程度,从最小到最大">]>;
8
+ export declare const ModelThinkingLevelSchema: v.SchemaWithPipe<readonly [v.PicklistSchema<["off", "minimal", "low", "medium", "high", "xhigh"], undefined>, v.TitleAction<"off" | "low" | "high" | "minimal" | "medium" | "xhigh", "模型思考等级">, v.DescriptionAction<"off" | "low" | "high" | "minimal" | "medium" | "xhigh", "关闭或设置模型思考的详细程度">]>;
9
+ /** OpenAI Completions compatibility overrides */
10
+ export declare const OpenAICompletionsCompatSchema: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
11
+ readonly supportsStore: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "支持存储">, v.DescriptionAction<boolean, "是否支持服务端会话存储">]>, undefined>;
12
+ readonly supportsDeveloperRole: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "支持开发者角色">, v.DescriptionAction<boolean, "是否支持 developer 系统消息角色">]>, undefined>;
13
+ readonly supportsReasoningEffort: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "支持推理努力">, v.DescriptionAction<boolean, "是否支持 reasoning_effort 参数">]>, undefined>;
14
+ readonly supportsUsageInStreaming: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "流式用量">, v.DescriptionAction<boolean, "流式输出中是否返回 usage 信息">]>, undefined>;
15
+ readonly maxTokensField: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["max_completion_tokens", "max_tokens"], undefined>, v.TitleAction<"max_completion_tokens" | "max_tokens", "最大 token 字段名">, v.DescriptionAction<"max_completion_tokens" | "max_tokens", "指定最大 token 参数使用的是哪个字段名">]>, undefined>;
16
+ readonly requiresToolResultName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "需要工具结果名称">, v.DescriptionAction<boolean, "是否要求工具结果消息包含 name 字段">]>, undefined>;
17
+ readonly requiresAssistantAfterToolResult: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "需要助手回复">, v.DescriptionAction<boolean, "工具结果后是否需要助手消息跟进">]>, undefined>;
18
+ readonly requiresThinkingAsText: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "思考转文本">, v.DescriptionAction<boolean, "是否将思考过程作为普通文本发送">]>, undefined>;
19
+ readonly requiresReasoningContentOnAssistantMessages: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "推理内容在助手消息中">, v.DescriptionAction<boolean, "是否在助手消息中包含推理内容">]>, undefined>;
20
+ readonly thinkingFormat: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["openai", "openrouter", "deepseek", "together", "zai", "qwen", "qwen-chat-template", "string-thinking", "ant-ling"], undefined>, v.TitleAction<"deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking", "思考格式">, v.DescriptionAction<"deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking", "指定 thinking 标签的序列化格式">]>, undefined>;
21
+ readonly openRouterRouting: v.OptionalSchema<v.SchemaWithPipe<readonly [v.UnknownSchema, v.TitleAction<unknown, "OpenRouter 路由">, v.DescriptionAction<unknown, "自定义 OpenRouter 的路由配置">]>, undefined>;
22
+ readonly vercelGatewayRouting: v.OptionalSchema<v.SchemaWithPipe<readonly [v.UnknownSchema, v.TitleAction<unknown, "Vercel Gateway 路由">, v.DescriptionAction<unknown, "自定义 Vercel AI Gateway 的路由配置">]>, undefined>;
23
+ readonly zaiToolStream: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "ZAI 工具流式">, v.DescriptionAction<boolean, "是否启用 ZAI 平台工具调用的流式输出">]>, undefined>;
24
+ readonly supportsStrictMode: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "严格模式">, v.DescriptionAction<boolean, "是否支持工具的 JSON Schema 严格校验">]>, undefined>;
25
+ readonly cacheControlFormat: v.OptionalSchema<v.SchemaWithPipe<readonly [v.LiteralSchema<"anthropic", undefined>, v.TitleAction<"anthropic", "缓存控制格式">, v.DescriptionAction<"anthropic", "指定缓存控制的语法格式">]>, undefined>;
26
+ readonly sendSessionAffinityHeaders: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "发送会话亲和标头">, v.DescriptionAction<boolean, "是否在请求中携带会话亲和性标头">]>, undefined>;
27
+ readonly supportsLongCacheRetention: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "长期缓存保留">, v.DescriptionAction<boolean, "是否支持长期缓存保留策略">]>, undefined>;
28
+ }, undefined>, undefined>, v.TitleAction<{
29
+ supportsStore?: boolean | undefined;
30
+ supportsDeveloperRole?: boolean | undefined;
31
+ supportsReasoningEffort?: boolean | undefined;
32
+ supportsUsageInStreaming?: boolean | undefined;
33
+ maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
34
+ requiresToolResultName?: boolean | undefined;
35
+ requiresAssistantAfterToolResult?: boolean | undefined;
36
+ requiresThinkingAsText?: boolean | undefined;
37
+ requiresReasoningContentOnAssistantMessages?: boolean | undefined;
38
+ thinkingFormat?: "deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking" | undefined;
39
+ openRouterRouting?: unknown;
40
+ vercelGatewayRouting?: unknown;
41
+ zaiToolStream?: boolean | undefined;
42
+ supportsStrictMode?: boolean | undefined;
43
+ cacheControlFormat?: "anthropic" | undefined;
44
+ sendSessionAffinityHeaders?: boolean | undefined;
45
+ supportsLongCacheRetention?: boolean | undefined;
46
+ } | undefined, "OpenAI Completions 兼容配置">, v.DescriptionAction<{
47
+ supportsStore?: boolean | undefined;
48
+ supportsDeveloperRole?: boolean | undefined;
49
+ supportsReasoningEffort?: boolean | undefined;
50
+ supportsUsageInStreaming?: boolean | undefined;
51
+ maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
52
+ requiresToolResultName?: boolean | undefined;
53
+ requiresAssistantAfterToolResult?: boolean | undefined;
54
+ requiresThinkingAsText?: boolean | undefined;
55
+ requiresReasoningContentOnAssistantMessages?: boolean | undefined;
56
+ thinkingFormat?: "deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking" | undefined;
57
+ openRouterRouting?: unknown;
58
+ vercelGatewayRouting?: unknown;
59
+ zaiToolStream?: boolean | undefined;
60
+ supportsStrictMode?: boolean | undefined;
61
+ cacheControlFormat?: "anthropic" | undefined;
62
+ sendSessionAffinityHeaders?: boolean | undefined;
63
+ supportsLongCacheRetention?: boolean | undefined;
64
+ } | undefined, "针对 OpenAI Completions API 的兼容性覆写选项">]>;
65
+ /** OpenAI Responses compatibility overrides */
66
+ export declare const OpenAIResponsesCompatSchema: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
67
+ readonly supportsDeveloperRole: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "支持开发者角色">, v.DescriptionAction<boolean, "是否支持 developer 系统消息角色">]>, undefined>;
68
+ readonly sendSessionIdHeader: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "发送会话 ID 标头">, v.DescriptionAction<boolean, "是否在请求中携带 X-Session-ID 标头">]>, undefined>;
69
+ readonly supportsLongCacheRetention: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "长期缓存保留">, v.DescriptionAction<boolean, "是否支持长期缓存保留策略">]>, undefined>;
70
+ }, undefined>, undefined>, v.TitleAction<{
71
+ supportsDeveloperRole?: boolean | undefined;
72
+ sendSessionIdHeader?: boolean | undefined;
73
+ supportsLongCacheRetention?: boolean | undefined;
74
+ } | undefined, "OpenAI Responses 兼容配置">, v.DescriptionAction<{
75
+ supportsDeveloperRole?: boolean | undefined;
76
+ sendSessionIdHeader?: boolean | undefined;
77
+ supportsLongCacheRetention?: boolean | undefined;
78
+ } | undefined, "针对 OpenAI Responses API 的兼容性覆写选项">]>;
79
+ /** Anthropic Messages compatibility overrides */
80
+ export declare const AnthropicMessagesCompatSchema: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
81
+ readonly supportsEagerToolInputStreaming: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, " eagerly 工具流式">, v.DescriptionAction<boolean, "是否支持工具调用的 eager 模式流式输出">]>, undefined>;
82
+ readonly supportsLongCacheRetention: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "长期缓存保留">, v.DescriptionAction<boolean, "是否支持长期缓存保留策略">]>, undefined>;
83
+ readonly sendSessionAffinityHeaders: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "发送会话亲和标头">, v.DescriptionAction<boolean, "是否在请求中携带会话亲和性标头">]>, undefined>;
84
+ readonly supportsCacheControlOnTools: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "工具缓存控制">, v.DescriptionAction<boolean, "是否支持在 tool_use 消息中使用 cache_control">]>, undefined>;
85
+ readonly supportsTemperature: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "支持温度参数">, v.DescriptionAction<boolean, "模型/接口是否支持 temperature 参数">]>, undefined>;
86
+ readonly forceAdaptiveThinking: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "强制自适应思考">, v.DescriptionAction<boolean, "是否强制启用 adaptive thinking 模式">]>, undefined>;
87
+ readonly allowEmptySignature: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "允许空签名">, v.DescriptionAction<boolean, "是否允许工具调用不指定签名(sha256)">]>, undefined>;
88
+ }, undefined>, undefined>, v.TitleAction<{
89
+ supportsEagerToolInputStreaming?: boolean | undefined;
90
+ supportsLongCacheRetention?: boolean | undefined;
91
+ sendSessionAffinityHeaders?: boolean | undefined;
92
+ supportsCacheControlOnTools?: boolean | undefined;
93
+ supportsTemperature?: boolean | undefined;
94
+ forceAdaptiveThinking?: boolean | undefined;
95
+ allowEmptySignature?: boolean | undefined;
96
+ } | undefined, "Anthropic Messages 兼容配置">, v.DescriptionAction<{
97
+ supportsEagerToolInputStreaming?: boolean | undefined;
98
+ supportsLongCacheRetention?: boolean | undefined;
99
+ sendSessionAffinityHeaders?: boolean | undefined;
100
+ supportsCacheControlOnTools?: boolean | undefined;
101
+ supportsTemperature?: boolean | undefined;
102
+ forceAdaptiveThinking?: boolean | undefined;
103
+ allowEmptySignature?: boolean | undefined;
104
+ } | undefined, "针对 Anthropic Messages API 的兼容性覆写选项">]>;
105
+ export declare const CompatSchema: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
106
+ readonly supportsStore: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "支持存储">, v.DescriptionAction<boolean, "是否支持服务端会话存储">]>, undefined>;
107
+ readonly supportsDeveloperRole: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "支持开发者角色">, v.DescriptionAction<boolean, "是否支持 developer 系统消息角色">]>, undefined>;
108
+ readonly supportsReasoningEffort: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "支持推理努力">, v.DescriptionAction<boolean, "是否支持 reasoning_effort 参数">]>, undefined>;
109
+ readonly supportsUsageInStreaming: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "流式用量">, v.DescriptionAction<boolean, "流式输出中是否返回 usage 信息">]>, undefined>;
110
+ readonly maxTokensField: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["max_completion_tokens", "max_tokens"], undefined>, v.TitleAction<"max_completion_tokens" | "max_tokens", "最大 token 字段名">, v.DescriptionAction<"max_completion_tokens" | "max_tokens", "指定最大 token 参数使用的是哪个字段名">]>, undefined>;
111
+ readonly requiresToolResultName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "需要工具结果名称">, v.DescriptionAction<boolean, "是否要求工具结果消息包含 name 字段">]>, undefined>;
112
+ readonly requiresAssistantAfterToolResult: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "需要助手回复">, v.DescriptionAction<boolean, "工具结果后是否需要助手消息跟进">]>, undefined>;
113
+ readonly requiresThinkingAsText: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "思考转文本">, v.DescriptionAction<boolean, "是否将思考过程作为普通文本发送">]>, undefined>;
114
+ readonly requiresReasoningContentOnAssistantMessages: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "推理内容在助手消息中">, v.DescriptionAction<boolean, "是否在助手消息中包含推理内容">]>, undefined>;
115
+ readonly thinkingFormat: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["openai", "openrouter", "deepseek", "together", "zai", "qwen", "qwen-chat-template", "string-thinking", "ant-ling"], undefined>, v.TitleAction<"deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking", "思考格式">, v.DescriptionAction<"deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking", "指定 thinking 标签的序列化格式">]>, undefined>;
116
+ readonly openRouterRouting: v.OptionalSchema<v.SchemaWithPipe<readonly [v.UnknownSchema, v.TitleAction<unknown, "OpenRouter 路由">, v.DescriptionAction<unknown, "自定义 OpenRouter 的路由配置">]>, undefined>;
117
+ readonly vercelGatewayRouting: v.OptionalSchema<v.SchemaWithPipe<readonly [v.UnknownSchema, v.TitleAction<unknown, "Vercel Gateway 路由">, v.DescriptionAction<unknown, "自定义 Vercel AI Gateway 的路由配置">]>, undefined>;
118
+ readonly zaiToolStream: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "ZAI 工具流式">, v.DescriptionAction<boolean, "是否启用 ZAI 平台工具调用的流式输出">]>, undefined>;
119
+ readonly supportsStrictMode: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "严格模式">, v.DescriptionAction<boolean, "是否支持工具的 JSON Schema 严格校验">]>, undefined>;
120
+ readonly cacheControlFormat: v.OptionalSchema<v.SchemaWithPipe<readonly [v.LiteralSchema<"anthropic", undefined>, v.TitleAction<"anthropic", "缓存控制格式">, v.DescriptionAction<"anthropic", "指定缓存控制的语法格式">]>, undefined>;
121
+ readonly sendSessionAffinityHeaders: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "发送会话亲和标头">, v.DescriptionAction<boolean, "是否在请求中携带会话亲和性标头">]>, undefined>;
122
+ readonly supportsLongCacheRetention: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "长期缓存保留">, v.DescriptionAction<boolean, "是否支持长期缓存保留策略">]>, undefined>;
123
+ }, undefined>, undefined>, v.TitleAction<{
124
+ supportsStore?: boolean | undefined;
125
+ supportsDeveloperRole?: boolean | undefined;
126
+ supportsReasoningEffort?: boolean | undefined;
127
+ supportsUsageInStreaming?: boolean | undefined;
128
+ maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
129
+ requiresToolResultName?: boolean | undefined;
130
+ requiresAssistantAfterToolResult?: boolean | undefined;
131
+ requiresThinkingAsText?: boolean | undefined;
132
+ requiresReasoningContentOnAssistantMessages?: boolean | undefined;
133
+ thinkingFormat?: "deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking" | undefined;
134
+ openRouterRouting?: unknown;
135
+ vercelGatewayRouting?: unknown;
136
+ zaiToolStream?: boolean | undefined;
137
+ supportsStrictMode?: boolean | undefined;
138
+ cacheControlFormat?: "anthropic" | undefined;
139
+ sendSessionAffinityHeaders?: boolean | undefined;
140
+ supportsLongCacheRetention?: boolean | undefined;
141
+ } | undefined, "OpenAI Completions 兼容配置">, v.DescriptionAction<{
142
+ supportsStore?: boolean | undefined;
143
+ supportsDeveloperRole?: boolean | undefined;
144
+ supportsReasoningEffort?: boolean | undefined;
145
+ supportsUsageInStreaming?: boolean | undefined;
146
+ maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
147
+ requiresToolResultName?: boolean | undefined;
148
+ requiresAssistantAfterToolResult?: boolean | undefined;
149
+ requiresThinkingAsText?: boolean | undefined;
150
+ requiresReasoningContentOnAssistantMessages?: boolean | undefined;
151
+ thinkingFormat?: "deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking" | undefined;
152
+ openRouterRouting?: unknown;
153
+ vercelGatewayRouting?: unknown;
154
+ zaiToolStream?: boolean | undefined;
155
+ supportsStrictMode?: boolean | undefined;
156
+ cacheControlFormat?: "anthropic" | undefined;
157
+ sendSessionAffinityHeaders?: boolean | undefined;
158
+ supportsLongCacheRetention?: boolean | undefined;
159
+ } | undefined, "针对 OpenAI Completions API 的兼容性覆写选项">]>, v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
160
+ readonly supportsDeveloperRole: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "支持开发者角色">, v.DescriptionAction<boolean, "是否支持 developer 系统消息角色">]>, undefined>;
161
+ readonly sendSessionIdHeader: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "发送会话 ID 标头">, v.DescriptionAction<boolean, "是否在请求中携带 X-Session-ID 标头">]>, undefined>;
162
+ readonly supportsLongCacheRetention: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "长期缓存保留">, v.DescriptionAction<boolean, "是否支持长期缓存保留策略">]>, undefined>;
163
+ }, undefined>, undefined>, v.TitleAction<{
164
+ supportsDeveloperRole?: boolean | undefined;
165
+ sendSessionIdHeader?: boolean | undefined;
166
+ supportsLongCacheRetention?: boolean | undefined;
167
+ } | undefined, "OpenAI Responses 兼容配置">, v.DescriptionAction<{
168
+ supportsDeveloperRole?: boolean | undefined;
169
+ sendSessionIdHeader?: boolean | undefined;
170
+ supportsLongCacheRetention?: boolean | undefined;
171
+ } | undefined, "针对 OpenAI Responses API 的兼容性覆写选项">]>, v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
172
+ readonly supportsEagerToolInputStreaming: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, " eagerly 工具流式">, v.DescriptionAction<boolean, "是否支持工具调用的 eager 模式流式输出">]>, undefined>;
173
+ readonly supportsLongCacheRetention: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "长期缓存保留">, v.DescriptionAction<boolean, "是否支持长期缓存保留策略">]>, undefined>;
174
+ readonly sendSessionAffinityHeaders: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "发送会话亲和标头">, v.DescriptionAction<boolean, "是否在请求中携带会话亲和性标头">]>, undefined>;
175
+ readonly supportsCacheControlOnTools: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "工具缓存控制">, v.DescriptionAction<boolean, "是否支持在 tool_use 消息中使用 cache_control">]>, undefined>;
176
+ readonly supportsTemperature: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "支持温度参数">, v.DescriptionAction<boolean, "模型/接口是否支持 temperature 参数">]>, undefined>;
177
+ readonly forceAdaptiveThinking: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "强制自适应思考">, v.DescriptionAction<boolean, "是否强制启用 adaptive thinking 模式">]>, undefined>;
178
+ readonly allowEmptySignature: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "允许空签名">, v.DescriptionAction<boolean, "是否允许工具调用不指定签名(sha256)">]>, undefined>;
179
+ }, undefined>, undefined>, v.TitleAction<{
180
+ supportsEagerToolInputStreaming?: boolean | undefined;
181
+ supportsLongCacheRetention?: boolean | undefined;
182
+ sendSessionAffinityHeaders?: boolean | undefined;
183
+ supportsCacheControlOnTools?: boolean | undefined;
184
+ supportsTemperature?: boolean | undefined;
185
+ forceAdaptiveThinking?: boolean | undefined;
186
+ allowEmptySignature?: boolean | undefined;
187
+ } | undefined, "Anthropic Messages 兼容配置">, v.DescriptionAction<{
188
+ supportsEagerToolInputStreaming?: boolean | undefined;
189
+ supportsLongCacheRetention?: boolean | undefined;
190
+ sendSessionAffinityHeaders?: boolean | undefined;
191
+ supportsCacheControlOnTools?: boolean | undefined;
192
+ supportsTemperature?: boolean | undefined;
193
+ forceAdaptiveThinking?: boolean | undefined;
194
+ allowEmptySignature?: boolean | undefined;
195
+ } | undefined, "针对 Anthropic Messages API 的兼容性覆写选项">]>], undefined>, v.TitleAction<{
196
+ supportsStore?: boolean | undefined;
197
+ supportsDeveloperRole?: boolean | undefined;
198
+ supportsReasoningEffort?: boolean | undefined;
199
+ supportsUsageInStreaming?: boolean | undefined;
200
+ maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
201
+ requiresToolResultName?: boolean | undefined;
202
+ requiresAssistantAfterToolResult?: boolean | undefined;
203
+ requiresThinkingAsText?: boolean | undefined;
204
+ requiresReasoningContentOnAssistantMessages?: boolean | undefined;
205
+ thinkingFormat?: "deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking" | undefined;
206
+ openRouterRouting?: unknown;
207
+ vercelGatewayRouting?: unknown;
208
+ zaiToolStream?: boolean | undefined;
209
+ supportsStrictMode?: boolean | undefined;
210
+ cacheControlFormat?: "anthropic" | undefined;
211
+ sendSessionAffinityHeaders?: boolean | undefined;
212
+ supportsLongCacheRetention?: boolean | undefined;
213
+ } | {
214
+ supportsDeveloperRole?: boolean | undefined;
215
+ sendSessionIdHeader?: boolean | undefined;
216
+ supportsLongCacheRetention?: boolean | undefined;
217
+ } | {
218
+ supportsEagerToolInputStreaming?: boolean | undefined;
219
+ supportsLongCacheRetention?: boolean | undefined;
220
+ sendSessionAffinityHeaders?: boolean | undefined;
221
+ supportsCacheControlOnTools?: boolean | undefined;
222
+ supportsTemperature?: boolean | undefined;
223
+ forceAdaptiveThinking?: boolean | undefined;
224
+ allowEmptySignature?: boolean | undefined;
225
+ } | undefined, "兼容配置">, v.DescriptionAction<{
226
+ supportsStore?: boolean | undefined;
227
+ supportsDeveloperRole?: boolean | undefined;
228
+ supportsReasoningEffort?: boolean | undefined;
229
+ supportsUsageInStreaming?: boolean | undefined;
230
+ maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
231
+ requiresToolResultName?: boolean | undefined;
232
+ requiresAssistantAfterToolResult?: boolean | undefined;
233
+ requiresThinkingAsText?: boolean | undefined;
234
+ requiresReasoningContentOnAssistantMessages?: boolean | undefined;
235
+ thinkingFormat?: "deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking" | undefined;
236
+ openRouterRouting?: unknown;
237
+ vercelGatewayRouting?: unknown;
238
+ zaiToolStream?: boolean | undefined;
239
+ supportsStrictMode?: boolean | undefined;
240
+ cacheControlFormat?: "anthropic" | undefined;
241
+ sendSessionAffinityHeaders?: boolean | undefined;
242
+ supportsLongCacheRetention?: boolean | undefined;
243
+ } | {
244
+ supportsDeveloperRole?: boolean | undefined;
245
+ sendSessionIdHeader?: boolean | undefined;
246
+ supportsLongCacheRetention?: boolean | undefined;
247
+ } | {
248
+ supportsEagerToolInputStreaming?: boolean | undefined;
249
+ supportsLongCacheRetention?: boolean | undefined;
250
+ sendSessionAffinityHeaders?: boolean | undefined;
251
+ supportsCacheControlOnTools?: boolean | undefined;
252
+ supportsTemperature?: boolean | undefined;
253
+ forceAdaptiveThinking?: boolean | undefined;
254
+ allowEmptySignature?: boolean | undefined;
255
+ } | undefined, "模型 API 兼容性覆写选项,支持 OpenAI Completions、OpenAI Responses、Anthropic Messages 三种格式">]>;
256
+ export declare const InputChoiceSchema: v.SchemaWithPipe<readonly [v.PicklistSchema<["text", "image"], undefined>, v.TitleAction<"text" | "image", "输入类型">, v.DescriptionAction<"text" | "image", "支持的输入模态类型">]>;
257
+ export declare const InputSchema: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["text", "image"], undefined>, v.TitleAction<"text" | "image", "输入类型">, v.DescriptionAction<"text" | "image", "支持的输入模态类型">]>, undefined>, v.TitleAction<("text" | "image")[], "输入类型列表">, v.DescriptionAction<("text" | "image")[], "该模型支持的用户输入类型,如 text 文本或 image 图片">]>;
258
+ /**
259
+ * Model schema for pi-ai models.
260
+ * Matches `Model<TApi extends Api>` but without generic type preservation
261
+ * at runtime — compat accepts any of the three compat variants via union.
262
+ */
263
+ export declare const ModelSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
264
+ readonly provider: v.SchemaWithPipe<readonly [v.OptionalSchema<v.StringSchema<undefined>, "default">, v.TitleAction<string, "厂商">, v.DescriptionAction<string, "模型提供商,如 openai / anthropic / llama">]>;
265
+ readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TitleAction<string, "基础 URL">, v.DescriptionAction<string, "API 请求的基础地址">]>;
266
+ readonly reasoning: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.TitleAction<boolean, "支持推理">, v.DescriptionAction<boolean, "该模型是否支持思考/推理模式">]>;
267
+ readonly input: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["text", "image"], undefined>, v.TitleAction<"text" | "image", "输入类型">, v.DescriptionAction<"text" | "image", "支持的输入模态类型">]>, undefined>, v.TitleAction<("text" | "image")[], "输入类型列表">, v.DescriptionAction<("text" | "image")[], "该模型支持的用户输入类型,如 text 文本或 image 图片">]>, readonly ["text", "image"]>, v.TitleAction<("text" | "image")[], "输入类型">, v.DescriptionAction<("text" | "image")[], "支持的输入模态类型">]>;
268
+ readonly cost: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
269
+ readonly input: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TitleAction<number, "输入单价">, v.DescriptionAction<number, "每 token 输入费用">]>;
270
+ readonly output: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TitleAction<number, "输出单价">, v.DescriptionAction<number, "每 token 输出费用">]>;
271
+ readonly cacheRead: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TitleAction<number, "缓存读取单价">, v.DescriptionAction<number, "从缓存读取每 token 的费用">]>;
272
+ readonly cacheWrite: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TitleAction<number, "缓存写入单价">, v.DescriptionAction<number, "写入缓存每 token 的费用">]>;
273
+ }, undefined>, {
274
+ readonly input: 0;
275
+ readonly output: 0;
276
+ readonly cacheRead: 0;
277
+ readonly cacheWrite: 0;
278
+ }>, v.TitleAction<{
279
+ input: number;
280
+ output: number;
281
+ cacheRead: number;
282
+ cacheWrite: number;
283
+ }, "费用配置">, v.DescriptionAction<{
284
+ input: number;
285
+ output: number;
286
+ cacheRead: number;
287
+ cacheWrite: number;
288
+ }, "模型各操作类型的 token 计价标准">]>, v.TitleAction<{
289
+ input: number;
290
+ output: number;
291
+ cacheRead: number;
292
+ cacheWrite: number;
293
+ }, "费用配置">, v.DescriptionAction<{
294
+ input: number;
295
+ output: number;
296
+ cacheRead: number;
297
+ cacheWrite: number;
298
+ }, "模型 token 计价标准">]>;
299
+ readonly contextWindow: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.OptionalSchema<v.NumberSchema<undefined>, 99999999>]>, v.TitleAction<number, "上下文窗口">, v.DescriptionAction<number, "模型支持的上下文最大 token 数">]>;
300
+ readonly maxTokens: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.OptionalSchema<v.NumberSchema<undefined>, 99999999>]>, v.TitleAction<number, "最大输出 tokens">, v.DescriptionAction<number, "单次请求允许的最大输出 token 数">]>;
301
+ readonly headers: v.OptionalSchema<v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, v.TitleAction<{
302
+ [x: string]: string;
303
+ }, "自定义请求头">, v.DescriptionAction<{
304
+ [x: string]: string;
305
+ }, "额外的 HTTP 请求头键值对配置">]>, undefined>, v.TitleAction<{
306
+ [x: string]: string;
307
+ } | undefined, "自定义请求头">, v.DescriptionAction<{
308
+ [x: string]: string;
309
+ } | undefined, "额外的 HTTP 请求头配置">]>, undefined>;
310
+ readonly compat: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
311
+ readonly supportsStore: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "支持存储">, v.DescriptionAction<boolean, "是否支持服务端会话存储">]>, undefined>;
312
+ readonly supportsDeveloperRole: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "支持开发者角色">, v.DescriptionAction<boolean, "是否支持 developer 系统消息角色">]>, undefined>;
313
+ readonly supportsReasoningEffort: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "支持推理努力">, v.DescriptionAction<boolean, "是否支持 reasoning_effort 参数">]>, undefined>;
314
+ readonly supportsUsageInStreaming: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "流式用量">, v.DescriptionAction<boolean, "流式输出中是否返回 usage 信息">]>, undefined>;
315
+ readonly maxTokensField: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["max_completion_tokens", "max_tokens"], undefined>, v.TitleAction<"max_completion_tokens" | "max_tokens", "最大 token 字段名">, v.DescriptionAction<"max_completion_tokens" | "max_tokens", "指定最大 token 参数使用的是哪个字段名">]>, undefined>;
316
+ readonly requiresToolResultName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "需要工具结果名称">, v.DescriptionAction<boolean, "是否要求工具结果消息包含 name 字段">]>, undefined>;
317
+ readonly requiresAssistantAfterToolResult: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "需要助手回复">, v.DescriptionAction<boolean, "工具结果后是否需要助手消息跟进">]>, undefined>;
318
+ readonly requiresThinkingAsText: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "思考转文本">, v.DescriptionAction<boolean, "是否将思考过程作为普通文本发送">]>, undefined>;
319
+ readonly requiresReasoningContentOnAssistantMessages: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "推理内容在助手消息中">, v.DescriptionAction<boolean, "是否在助手消息中包含推理内容">]>, undefined>;
320
+ readonly thinkingFormat: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["openai", "openrouter", "deepseek", "together", "zai", "qwen", "qwen-chat-template", "string-thinking", "ant-ling"], undefined>, v.TitleAction<"deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking", "思考格式">, v.DescriptionAction<"deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking", "指定 thinking 标签的序列化格式">]>, undefined>;
321
+ readonly openRouterRouting: v.OptionalSchema<v.SchemaWithPipe<readonly [v.UnknownSchema, v.TitleAction<unknown, "OpenRouter 路由">, v.DescriptionAction<unknown, "自定义 OpenRouter 的路由配置">]>, undefined>;
322
+ readonly vercelGatewayRouting: v.OptionalSchema<v.SchemaWithPipe<readonly [v.UnknownSchema, v.TitleAction<unknown, "Vercel Gateway 路由">, v.DescriptionAction<unknown, "自定义 Vercel AI Gateway 的路由配置">]>, undefined>;
323
+ readonly zaiToolStream: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "ZAI 工具流式">, v.DescriptionAction<boolean, "是否启用 ZAI 平台工具调用的流式输出">]>, undefined>;
324
+ readonly supportsStrictMode: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "严格模式">, v.DescriptionAction<boolean, "是否支持工具的 JSON Schema 严格校验">]>, undefined>;
325
+ readonly cacheControlFormat: v.OptionalSchema<v.SchemaWithPipe<readonly [v.LiteralSchema<"anthropic", undefined>, v.TitleAction<"anthropic", "缓存控制格式">, v.DescriptionAction<"anthropic", "指定缓存控制的语法格式">]>, undefined>;
326
+ readonly sendSessionAffinityHeaders: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "发送会话亲和标头">, v.DescriptionAction<boolean, "是否在请求中携带会话亲和性标头">]>, undefined>;
327
+ readonly supportsLongCacheRetention: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "长期缓存保留">, v.DescriptionAction<boolean, "是否支持长期缓存保留策略">]>, undefined>;
328
+ }, undefined>, undefined>, v.TitleAction<{
329
+ supportsStore?: boolean | undefined;
330
+ supportsDeveloperRole?: boolean | undefined;
331
+ supportsReasoningEffort?: boolean | undefined;
332
+ supportsUsageInStreaming?: boolean | undefined;
333
+ maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
334
+ requiresToolResultName?: boolean | undefined;
335
+ requiresAssistantAfterToolResult?: boolean | undefined;
336
+ requiresThinkingAsText?: boolean | undefined;
337
+ requiresReasoningContentOnAssistantMessages?: boolean | undefined;
338
+ thinkingFormat?: "deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking" | undefined;
339
+ openRouterRouting?: unknown;
340
+ vercelGatewayRouting?: unknown;
341
+ zaiToolStream?: boolean | undefined;
342
+ supportsStrictMode?: boolean | undefined;
343
+ cacheControlFormat?: "anthropic" | undefined;
344
+ sendSessionAffinityHeaders?: boolean | undefined;
345
+ supportsLongCacheRetention?: boolean | undefined;
346
+ } | undefined, "OpenAI Completions 兼容配置">, v.DescriptionAction<{
347
+ supportsStore?: boolean | undefined;
348
+ supportsDeveloperRole?: boolean | undefined;
349
+ supportsReasoningEffort?: boolean | undefined;
350
+ supportsUsageInStreaming?: boolean | undefined;
351
+ maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
352
+ requiresToolResultName?: boolean | undefined;
353
+ requiresAssistantAfterToolResult?: boolean | undefined;
354
+ requiresThinkingAsText?: boolean | undefined;
355
+ requiresReasoningContentOnAssistantMessages?: boolean | undefined;
356
+ thinkingFormat?: "deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking" | undefined;
357
+ openRouterRouting?: unknown;
358
+ vercelGatewayRouting?: unknown;
359
+ zaiToolStream?: boolean | undefined;
360
+ supportsStrictMode?: boolean | undefined;
361
+ cacheControlFormat?: "anthropic" | undefined;
362
+ sendSessionAffinityHeaders?: boolean | undefined;
363
+ supportsLongCacheRetention?: boolean | undefined;
364
+ } | undefined, "针对 OpenAI Completions API 的兼容性覆写选项">]>, v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
365
+ readonly supportsDeveloperRole: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "支持开发者角色">, v.DescriptionAction<boolean, "是否支持 developer 系统消息角色">]>, undefined>;
366
+ readonly sendSessionIdHeader: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "发送会话 ID 标头">, v.DescriptionAction<boolean, "是否在请求中携带 X-Session-ID 标头">]>, undefined>;
367
+ readonly supportsLongCacheRetention: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "长期缓存保留">, v.DescriptionAction<boolean, "是否支持长期缓存保留策略">]>, undefined>;
368
+ }, undefined>, undefined>, v.TitleAction<{
369
+ supportsDeveloperRole?: boolean | undefined;
370
+ sendSessionIdHeader?: boolean | undefined;
371
+ supportsLongCacheRetention?: boolean | undefined;
372
+ } | undefined, "OpenAI Responses 兼容配置">, v.DescriptionAction<{
373
+ supportsDeveloperRole?: boolean | undefined;
374
+ sendSessionIdHeader?: boolean | undefined;
375
+ supportsLongCacheRetention?: boolean | undefined;
376
+ } | undefined, "针对 OpenAI Responses API 的兼容性覆写选项">]>, v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
377
+ readonly supportsEagerToolInputStreaming: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, " eagerly 工具流式">, v.DescriptionAction<boolean, "是否支持工具调用的 eager 模式流式输出">]>, undefined>;
378
+ readonly supportsLongCacheRetention: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "长期缓存保留">, v.DescriptionAction<boolean, "是否支持长期缓存保留策略">]>, undefined>;
379
+ readonly sendSessionAffinityHeaders: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "发送会话亲和标头">, v.DescriptionAction<boolean, "是否在请求中携带会话亲和性标头">]>, undefined>;
380
+ readonly supportsCacheControlOnTools: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "工具缓存控制">, v.DescriptionAction<boolean, "是否支持在 tool_use 消息中使用 cache_control">]>, undefined>;
381
+ readonly supportsTemperature: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "支持温度参数">, v.DescriptionAction<boolean, "模型/接口是否支持 temperature 参数">]>, undefined>;
382
+ readonly forceAdaptiveThinking: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "强制自适应思考">, v.DescriptionAction<boolean, "是否强制启用 adaptive thinking 模式">]>, undefined>;
383
+ readonly allowEmptySignature: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "允许空签名">, v.DescriptionAction<boolean, "是否允许工具调用不指定签名(sha256)">]>, undefined>;
384
+ }, undefined>, undefined>, v.TitleAction<{
385
+ supportsEagerToolInputStreaming?: boolean | undefined;
386
+ supportsLongCacheRetention?: boolean | undefined;
387
+ sendSessionAffinityHeaders?: boolean | undefined;
388
+ supportsCacheControlOnTools?: boolean | undefined;
389
+ supportsTemperature?: boolean | undefined;
390
+ forceAdaptiveThinking?: boolean | undefined;
391
+ allowEmptySignature?: boolean | undefined;
392
+ } | undefined, "Anthropic Messages 兼容配置">, v.DescriptionAction<{
393
+ supportsEagerToolInputStreaming?: boolean | undefined;
394
+ supportsLongCacheRetention?: boolean | undefined;
395
+ sendSessionAffinityHeaders?: boolean | undefined;
396
+ supportsCacheControlOnTools?: boolean | undefined;
397
+ supportsTemperature?: boolean | undefined;
398
+ forceAdaptiveThinking?: boolean | undefined;
399
+ allowEmptySignature?: boolean | undefined;
400
+ } | undefined, "针对 Anthropic Messages API 的兼容性覆写选项">]>], undefined>, v.TitleAction<{
401
+ supportsStore?: boolean | undefined;
402
+ supportsDeveloperRole?: boolean | undefined;
403
+ supportsReasoningEffort?: boolean | undefined;
404
+ supportsUsageInStreaming?: boolean | undefined;
405
+ maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
406
+ requiresToolResultName?: boolean | undefined;
407
+ requiresAssistantAfterToolResult?: boolean | undefined;
408
+ requiresThinkingAsText?: boolean | undefined;
409
+ requiresReasoningContentOnAssistantMessages?: boolean | undefined;
410
+ thinkingFormat?: "deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking" | undefined;
411
+ openRouterRouting?: unknown;
412
+ vercelGatewayRouting?: unknown;
413
+ zaiToolStream?: boolean | undefined;
414
+ supportsStrictMode?: boolean | undefined;
415
+ cacheControlFormat?: "anthropic" | undefined;
416
+ sendSessionAffinityHeaders?: boolean | undefined;
417
+ supportsLongCacheRetention?: boolean | undefined;
418
+ } | {
419
+ supportsDeveloperRole?: boolean | undefined;
420
+ sendSessionIdHeader?: boolean | undefined;
421
+ supportsLongCacheRetention?: boolean | undefined;
422
+ } | {
423
+ supportsEagerToolInputStreaming?: boolean | undefined;
424
+ supportsLongCacheRetention?: boolean | undefined;
425
+ sendSessionAffinityHeaders?: boolean | undefined;
426
+ supportsCacheControlOnTools?: boolean | undefined;
427
+ supportsTemperature?: boolean | undefined;
428
+ forceAdaptiveThinking?: boolean | undefined;
429
+ allowEmptySignature?: boolean | undefined;
430
+ } | undefined, "兼容配置">, v.DescriptionAction<{
431
+ supportsStore?: boolean | undefined;
432
+ supportsDeveloperRole?: boolean | undefined;
433
+ supportsReasoningEffort?: boolean | undefined;
434
+ supportsUsageInStreaming?: boolean | undefined;
435
+ maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
436
+ requiresToolResultName?: boolean | undefined;
437
+ requiresAssistantAfterToolResult?: boolean | undefined;
438
+ requiresThinkingAsText?: boolean | undefined;
439
+ requiresReasoningContentOnAssistantMessages?: boolean | undefined;
440
+ thinkingFormat?: "deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking" | undefined;
441
+ openRouterRouting?: unknown;
442
+ vercelGatewayRouting?: unknown;
443
+ zaiToolStream?: boolean | undefined;
444
+ supportsStrictMode?: boolean | undefined;
445
+ cacheControlFormat?: "anthropic" | undefined;
446
+ sendSessionAffinityHeaders?: boolean | undefined;
447
+ supportsLongCacheRetention?: boolean | undefined;
448
+ } | {
449
+ supportsDeveloperRole?: boolean | undefined;
450
+ sendSessionIdHeader?: boolean | undefined;
451
+ supportsLongCacheRetention?: boolean | undefined;
452
+ } | {
453
+ supportsEagerToolInputStreaming?: boolean | undefined;
454
+ supportsLongCacheRetention?: boolean | undefined;
455
+ sendSessionAffinityHeaders?: boolean | undefined;
456
+ supportsCacheControlOnTools?: boolean | undefined;
457
+ supportsTemperature?: boolean | undefined;
458
+ forceAdaptiveThinking?: boolean | undefined;
459
+ allowEmptySignature?: boolean | undefined;
460
+ } | undefined, "模型 API 兼容性覆写选项,支持 OpenAI Completions、OpenAI Responses、Anthropic Messages 三种格式">]>, {
461
+ readonly supportsDeveloperRole: false;
462
+ }>, v.TitleAction<{
463
+ supportsStore?: boolean | undefined;
464
+ supportsDeveloperRole?: boolean | undefined;
465
+ supportsReasoningEffort?: boolean | undefined;
466
+ supportsUsageInStreaming?: boolean | undefined;
467
+ maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
468
+ requiresToolResultName?: boolean | undefined;
469
+ requiresAssistantAfterToolResult?: boolean | undefined;
470
+ requiresThinkingAsText?: boolean | undefined;
471
+ requiresReasoningContentOnAssistantMessages?: boolean | undefined;
472
+ thinkingFormat?: "deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking" | undefined;
473
+ openRouterRouting?: unknown;
474
+ vercelGatewayRouting?: unknown;
475
+ zaiToolStream?: boolean | undefined;
476
+ supportsStrictMode?: boolean | undefined;
477
+ cacheControlFormat?: "anthropic" | undefined;
478
+ sendSessionAffinityHeaders?: boolean | undefined;
479
+ supportsLongCacheRetention?: boolean | undefined;
480
+ } | {
481
+ supportsDeveloperRole?: boolean | undefined;
482
+ sendSessionIdHeader?: boolean | undefined;
483
+ supportsLongCacheRetention?: boolean | undefined;
484
+ } | {
485
+ supportsEagerToolInputStreaming?: boolean | undefined;
486
+ supportsLongCacheRetention?: boolean | undefined;
487
+ sendSessionAffinityHeaders?: boolean | undefined;
488
+ supportsCacheControlOnTools?: boolean | undefined;
489
+ supportsTemperature?: boolean | undefined;
490
+ forceAdaptiveThinking?: boolean | undefined;
491
+ allowEmptySignature?: boolean | undefined;
492
+ } | undefined, "兼容配置">, v.DescriptionAction<{
493
+ supportsStore?: boolean | undefined;
494
+ supportsDeveloperRole?: boolean | undefined;
495
+ supportsReasoningEffort?: boolean | undefined;
496
+ supportsUsageInStreaming?: boolean | undefined;
497
+ maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
498
+ requiresToolResultName?: boolean | undefined;
499
+ requiresAssistantAfterToolResult?: boolean | undefined;
500
+ requiresThinkingAsText?: boolean | undefined;
501
+ requiresReasoningContentOnAssistantMessages?: boolean | undefined;
502
+ thinkingFormat?: "deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking" | undefined;
503
+ openRouterRouting?: unknown;
504
+ vercelGatewayRouting?: unknown;
505
+ zaiToolStream?: boolean | undefined;
506
+ supportsStrictMode?: boolean | undefined;
507
+ cacheControlFormat?: "anthropic" | undefined;
508
+ sendSessionAffinityHeaders?: boolean | undefined;
509
+ supportsLongCacheRetention?: boolean | undefined;
510
+ } | {
511
+ supportsDeveloperRole?: boolean | undefined;
512
+ sendSessionIdHeader?: boolean | undefined;
513
+ supportsLongCacheRetention?: boolean | undefined;
514
+ } | {
515
+ supportsEagerToolInputStreaming?: boolean | undefined;
516
+ supportsLongCacheRetention?: boolean | undefined;
517
+ sendSessionAffinityHeaders?: boolean | undefined;
518
+ supportsCacheControlOnTools?: boolean | undefined;
519
+ supportsTemperature?: boolean | undefined;
520
+ forceAdaptiveThinking?: boolean | undefined;
521
+ allowEmptySignature?: boolean | undefined;
522
+ } | undefined, "API 兼容性覆写选项">]>;
523
+ }, undefined>, v.TitleAction<{
524
+ provider: string;
525
+ baseUrl: string;
526
+ reasoning: boolean;
527
+ input: ("text" | "image")[];
528
+ cost: {
529
+ input: number;
530
+ output: number;
531
+ cacheRead: number;
532
+ cacheWrite: number;
533
+ };
534
+ contextWindow: number;
535
+ maxTokens: number;
536
+ headers?: {
537
+ [x: string]: string;
538
+ } | undefined;
539
+ compat: {
540
+ supportsStore?: boolean | undefined;
541
+ supportsDeveloperRole?: boolean | undefined;
542
+ supportsReasoningEffort?: boolean | undefined;
543
+ supportsUsageInStreaming?: boolean | undefined;
544
+ maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
545
+ requiresToolResultName?: boolean | undefined;
546
+ requiresAssistantAfterToolResult?: boolean | undefined;
547
+ requiresThinkingAsText?: boolean | undefined;
548
+ requiresReasoningContentOnAssistantMessages?: boolean | undefined;
549
+ thinkingFormat?: "deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking" | undefined;
550
+ openRouterRouting?: unknown;
551
+ vercelGatewayRouting?: unknown;
552
+ zaiToolStream?: boolean | undefined;
553
+ supportsStrictMode?: boolean | undefined;
554
+ cacheControlFormat?: "anthropic" | undefined;
555
+ sendSessionAffinityHeaders?: boolean | undefined;
556
+ supportsLongCacheRetention?: boolean | undefined;
557
+ } | {
558
+ supportsDeveloperRole?: boolean | undefined;
559
+ sendSessionIdHeader?: boolean | undefined;
560
+ supportsLongCacheRetention?: boolean | undefined;
561
+ } | {
562
+ supportsEagerToolInputStreaming?: boolean | undefined;
563
+ supportsLongCacheRetention?: boolean | undefined;
564
+ sendSessionAffinityHeaders?: boolean | undefined;
565
+ supportsCacheControlOnTools?: boolean | undefined;
566
+ supportsTemperature?: boolean | undefined;
567
+ forceAdaptiveThinking?: boolean | undefined;
568
+ allowEmptySignature?: boolean | undefined;
569
+ } | undefined;
570
+ }, "模型定义">, v.DescriptionAction<{
571
+ provider: string;
572
+ baseUrl: string;
573
+ reasoning: boolean;
574
+ input: ("text" | "image")[];
575
+ cost: {
576
+ input: number;
577
+ output: number;
578
+ cacheRead: number;
579
+ cacheWrite: number;
580
+ };
581
+ contextWindow: number;
582
+ maxTokens: number;
583
+ headers?: {
584
+ [x: string]: string;
585
+ } | undefined;
586
+ compat: {
587
+ supportsStore?: boolean | undefined;
588
+ supportsDeveloperRole?: boolean | undefined;
589
+ supportsReasoningEffort?: boolean | undefined;
590
+ supportsUsageInStreaming?: boolean | undefined;
591
+ maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
592
+ requiresToolResultName?: boolean | undefined;
593
+ requiresAssistantAfterToolResult?: boolean | undefined;
594
+ requiresThinkingAsText?: boolean | undefined;
595
+ requiresReasoningContentOnAssistantMessages?: boolean | undefined;
596
+ thinkingFormat?: "deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking" | undefined;
597
+ openRouterRouting?: unknown;
598
+ vercelGatewayRouting?: unknown;
599
+ zaiToolStream?: boolean | undefined;
600
+ supportsStrictMode?: boolean | undefined;
601
+ cacheControlFormat?: "anthropic" | undefined;
602
+ sendSessionAffinityHeaders?: boolean | undefined;
603
+ supportsLongCacheRetention?: boolean | undefined;
604
+ } | {
605
+ supportsDeveloperRole?: boolean | undefined;
606
+ sendSessionIdHeader?: boolean | undefined;
607
+ supportsLongCacheRetention?: boolean | undefined;
608
+ } | {
609
+ supportsEagerToolInputStreaming?: boolean | undefined;
610
+ supportsLongCacheRetention?: boolean | undefined;
611
+ sendSessionAffinityHeaders?: boolean | undefined;
612
+ supportsCacheControlOnTools?: boolean | undefined;
613
+ supportsTemperature?: boolean | undefined;
614
+ forceAdaptiveThinking?: boolean | undefined;
615
+ allowEmptySignature?: boolean | undefined;
616
+ } | undefined;
617
+ }, "pi-ai 模型的核心配置结构,包含模型标识、API 参数、费用及兼容性设置">]>;
618
+ export type ModelInput = v.InferInput<typeof ModelSchema>;
619
+ export type ModelOutput = v.InferOutput<typeof ModelSchema>;
620
+ /** Output array for image models: ("text" | "image")[] */
621
+ export declare const OutputSchema: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["text", "image"], undefined>, v.TitleAction<"text" | "image", "输入类型">, v.DescriptionAction<"text" | "image", "支持的输入模态类型">]>, undefined>, v.TitleAction<("text" | "image")[], "输入类型列表">, v.DescriptionAction<("text" | "image")[], "该模型支持的用户输入类型,如 text 文本或 image 图片">]>;
622
+ export declare const ModelConfigDefine: v.SchemaWithPipe<readonly [v.ObjectSchema<{
623
+ readonly provider: v.SchemaWithPipe<readonly [v.PicklistSchema<["amazon-bedrock", "anthropic", "google", "google-vertex", "openai", "azure-openai-responses", "openai-codex", "deepseek", "github-copilot", "xai", "groq", "cerebras", "openrouter", "vercel-ai-gateway", "zai", "mistral", "minimax", "minimax-cn", "moonshotai", "moonshotai-cn", "huggingface", "fireworks", "together", "opencode", "opencode-go", "kimi-coding", "cloudflare-workers-ai", "cloudflare-ai-gateway", "xiaomi", "xiaomi-token-plan-cn", "xiaomi-token-plan-ams", "xiaomi-token-plan-sgp", "ant-ling", "nvidia", "zai-coding-cn", "openai-completions", "openai-responses", "anthropic-messages"], undefined>, v.TitleAction<"deepseek" | "amazon-bedrock" | "anthropic" | "google" | "google-vertex" | "openai" | "azure-openai-responses" | "openai-codex" | "github-copilot" | "xai" | "groq" | "cerebras" | "openrouter" | "vercel-ai-gateway" | "zai" | "mistral" | "minimax" | "minimax-cn" | "moonshotai" | "moonshotai-cn" | "huggingface" | "fireworks" | "together" | "opencode" | "opencode-go" | "kimi-coding" | "cloudflare-workers-ai" | "cloudflare-ai-gateway" | "xiaomi" | "xiaomi-token-plan-cn" | "xiaomi-token-plan-ams" | "xiaomi-token-plan-sgp" | "ant-ling" | "nvidia" | "zai-coding-cn" | "openai-completions" | "openai-responses" | "anthropic-messages", "提供商">, v.DescriptionAction<"deepseek" | "amazon-bedrock" | "anthropic" | "google" | "google-vertex" | "openai" | "azure-openai-responses" | "openai-codex" | "github-copilot" | "xai" | "groq" | "cerebras" | "openrouter" | "vercel-ai-gateway" | "zai" | "mistral" | "minimax" | "minimax-cn" | "moonshotai" | "moonshotai-cn" | "huggingface" | "fireworks" | "together" | "opencode" | "opencode-go" | "kimi-coding" | "cloudflare-workers-ai" | "cloudflare-ai-gateway" | "xiaomi" | "xiaomi-token-plan-cn" | "xiaomi-token-plan-ams" | "xiaomi-token-plan-sgp" | "ant-ling" | "nvidia" | "zai-coding-cn" | "openai-completions" | "openai-responses" | "anthropic-messages", "'openai-completions','openai-responses','anthropic-messages',为自定义提供商">]>;
624
+ readonly model: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TitleAction<string, "模型名">]>;
625
+ readonly name: v.SchemaWithPipe<readonly [v.OptionalSchema<v.StringSchema<undefined>, undefined>, v.TitleAction<string | undefined, "配置名">, v.DescriptionAction<string | undefined, "模型的配置名称(默认为模型名)">]>;
626
+ /** provider是自定义时使用 */
627
+ readonly apiKey: v.SchemaWithPipe<readonly [v.OptionalSchema<v.StringSchema<undefined>, undefined>, v.TitleAction<string | undefined, "apiKey">]>;
628
+ readonly config: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
629
+ readonly provider: v.SchemaWithPipe<readonly [v.OptionalSchema<v.StringSchema<undefined>, "default">, v.TitleAction<string, "厂商">, v.DescriptionAction<string, "模型提供商,如 openai / anthropic / llama">]>;
630
+ readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TitleAction<string, "基础 URL">, v.DescriptionAction<string, "API 请求的基础地址">]>;
631
+ readonly reasoning: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.TitleAction<boolean, "支持推理">, v.DescriptionAction<boolean, "该模型是否支持思考/推理模式">]>;
632
+ readonly input: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["text", "image"], undefined>, v.TitleAction<"text" | "image", "输入类型">, v.DescriptionAction<"text" | "image", "支持的输入模态类型">]>, undefined>, v.TitleAction<("text" | "image")[], "输入类型列表">, v.DescriptionAction<("text" | "image")[], "该模型支持的用户输入类型,如 text 文本或 image 图片">]>, readonly ["text", "image"]>, v.TitleAction<("text" | "image")[], "输入类型">, v.DescriptionAction<("text" | "image")[], "支持的输入模态类型">]>;
633
+ readonly cost: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
634
+ readonly input: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TitleAction<number, "输入单价">, v.DescriptionAction<number, "每 token 输入费用">]>;
635
+ readonly output: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TitleAction<number, "输出单价">, v.DescriptionAction<number, "每 token 输出费用">]>;
636
+ readonly cacheRead: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TitleAction<number, "缓存读取单价">, v.DescriptionAction<number, "从缓存读取每 token 的费用">]>;
637
+ readonly cacheWrite: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TitleAction<number, "缓存写入单价">, v.DescriptionAction<number, "写入缓存每 token 的费用">]>;
638
+ }, undefined>, {
639
+ readonly input: 0;
640
+ readonly output: 0;
641
+ readonly cacheRead: 0;
642
+ readonly cacheWrite: 0;
643
+ }>, v.TitleAction<{
644
+ input: number;
645
+ output: number;
646
+ cacheRead: number;
647
+ cacheWrite: number;
648
+ }, "费用配置">, v.DescriptionAction<{
649
+ input: number;
650
+ output: number;
651
+ cacheRead: number;
652
+ cacheWrite: number;
653
+ }, "模型各操作类型的 token 计价标准">]>, v.TitleAction<{
654
+ input: number;
655
+ output: number;
656
+ cacheRead: number;
657
+ cacheWrite: number;
658
+ }, "费用配置">, v.DescriptionAction<{
659
+ input: number;
660
+ output: number;
661
+ cacheRead: number;
662
+ cacheWrite: number;
663
+ }, "模型 token 计价标准">]>;
664
+ readonly contextWindow: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.OptionalSchema<v.NumberSchema<undefined>, 99999999>]>, v.TitleAction<number, "上下文窗口">, v.DescriptionAction<number, "模型支持的上下文最大 token 数">]>;
665
+ readonly maxTokens: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.OptionalSchema<v.NumberSchema<undefined>, 99999999>]>, v.TitleAction<number, "最大输出 tokens">, v.DescriptionAction<number, "单次请求允许的最大输出 token 数">]>;
666
+ readonly headers: v.OptionalSchema<v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, v.TitleAction<{
667
+ [x: string]: string;
668
+ }, "自定义请求头">, v.DescriptionAction<{
669
+ [x: string]: string;
670
+ }, "额外的 HTTP 请求头键值对配置">]>, undefined>, v.TitleAction<{
671
+ [x: string]: string;
672
+ } | undefined, "自定义请求头">, v.DescriptionAction<{
673
+ [x: string]: string;
674
+ } | undefined, "额外的 HTTP 请求头配置">]>, undefined>;
675
+ readonly compat: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
676
+ readonly supportsStore: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "支持存储">, v.DescriptionAction<boolean, "是否支持服务端会话存储">]>, undefined>;
677
+ readonly supportsDeveloperRole: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "支持开发者角色">, v.DescriptionAction<boolean, "是否支持 developer 系统消息角色">]>, undefined>;
678
+ readonly supportsReasoningEffort: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "支持推理努力">, v.DescriptionAction<boolean, "是否支持 reasoning_effort 参数">]>, undefined>;
679
+ readonly supportsUsageInStreaming: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "流式用量">, v.DescriptionAction<boolean, "流式输出中是否返回 usage 信息">]>, undefined>;
680
+ readonly maxTokensField: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["max_completion_tokens", "max_tokens"], undefined>, v.TitleAction<"max_completion_tokens" | "max_tokens", "最大 token 字段名">, v.DescriptionAction<"max_completion_tokens" | "max_tokens", "指定最大 token 参数使用的是哪个字段名">]>, undefined>;
681
+ readonly requiresToolResultName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "需要工具结果名称">, v.DescriptionAction<boolean, "是否要求工具结果消息包含 name 字段">]>, undefined>;
682
+ readonly requiresAssistantAfterToolResult: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "需要助手回复">, v.DescriptionAction<boolean, "工具结果后是否需要助手消息跟进">]>, undefined>;
683
+ readonly requiresThinkingAsText: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "思考转文本">, v.DescriptionAction<boolean, "是否将思考过程作为普通文本发送">]>, undefined>;
684
+ readonly requiresReasoningContentOnAssistantMessages: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "推理内容在助手消息中">, v.DescriptionAction<boolean, "是否在助手消息中包含推理内容">]>, undefined>;
685
+ readonly thinkingFormat: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["openai", "openrouter", "deepseek", "together", "zai", "qwen", "qwen-chat-template", "string-thinking", "ant-ling"], undefined>, v.TitleAction<"deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking", "思考格式">, v.DescriptionAction<"deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking", "指定 thinking 标签的序列化格式">]>, undefined>;
686
+ readonly openRouterRouting: v.OptionalSchema<v.SchemaWithPipe<readonly [v.UnknownSchema, v.TitleAction<unknown, "OpenRouter 路由">, v.DescriptionAction<unknown, "自定义 OpenRouter 的路由配置">]>, undefined>;
687
+ readonly vercelGatewayRouting: v.OptionalSchema<v.SchemaWithPipe<readonly [v.UnknownSchema, v.TitleAction<unknown, "Vercel Gateway 路由">, v.DescriptionAction<unknown, "自定义 Vercel AI Gateway 的路由配置">]>, undefined>;
688
+ readonly zaiToolStream: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "ZAI 工具流式">, v.DescriptionAction<boolean, "是否启用 ZAI 平台工具调用的流式输出">]>, undefined>;
689
+ readonly supportsStrictMode: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "严格模式">, v.DescriptionAction<boolean, "是否支持工具的 JSON Schema 严格校验">]>, undefined>;
690
+ readonly cacheControlFormat: v.OptionalSchema<v.SchemaWithPipe<readonly [v.LiteralSchema<"anthropic", undefined>, v.TitleAction<"anthropic", "缓存控制格式">, v.DescriptionAction<"anthropic", "指定缓存控制的语法格式">]>, undefined>;
691
+ readonly sendSessionAffinityHeaders: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "发送会话亲和标头">, v.DescriptionAction<boolean, "是否在请求中携带会话亲和性标头">]>, undefined>;
692
+ readonly supportsLongCacheRetention: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "长期缓存保留">, v.DescriptionAction<boolean, "是否支持长期缓存保留策略">]>, undefined>;
693
+ }, undefined>, undefined>, v.TitleAction<{
694
+ supportsStore?: boolean | undefined;
695
+ supportsDeveloperRole?: boolean | undefined;
696
+ supportsReasoningEffort?: boolean | undefined;
697
+ supportsUsageInStreaming?: boolean | undefined;
698
+ maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
699
+ requiresToolResultName?: boolean | undefined;
700
+ requiresAssistantAfterToolResult?: boolean | undefined;
701
+ requiresThinkingAsText?: boolean | undefined;
702
+ requiresReasoningContentOnAssistantMessages?: boolean | undefined;
703
+ thinkingFormat?: "deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking" | undefined;
704
+ openRouterRouting?: unknown;
705
+ vercelGatewayRouting?: unknown;
706
+ zaiToolStream?: boolean | undefined;
707
+ supportsStrictMode?: boolean | undefined;
708
+ cacheControlFormat?: "anthropic" | undefined;
709
+ sendSessionAffinityHeaders?: boolean | undefined;
710
+ supportsLongCacheRetention?: boolean | undefined;
711
+ } | undefined, "OpenAI Completions 兼容配置">, v.DescriptionAction<{
712
+ supportsStore?: boolean | undefined;
713
+ supportsDeveloperRole?: boolean | undefined;
714
+ supportsReasoningEffort?: boolean | undefined;
715
+ supportsUsageInStreaming?: boolean | undefined;
716
+ maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
717
+ requiresToolResultName?: boolean | undefined;
718
+ requiresAssistantAfterToolResult?: boolean | undefined;
719
+ requiresThinkingAsText?: boolean | undefined;
720
+ requiresReasoningContentOnAssistantMessages?: boolean | undefined;
721
+ thinkingFormat?: "deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking" | undefined;
722
+ openRouterRouting?: unknown;
723
+ vercelGatewayRouting?: unknown;
724
+ zaiToolStream?: boolean | undefined;
725
+ supportsStrictMode?: boolean | undefined;
726
+ cacheControlFormat?: "anthropic" | undefined;
727
+ sendSessionAffinityHeaders?: boolean | undefined;
728
+ supportsLongCacheRetention?: boolean | undefined;
729
+ } | undefined, "针对 OpenAI Completions API 的兼容性覆写选项">]>, v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
730
+ readonly supportsDeveloperRole: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "支持开发者角色">, v.DescriptionAction<boolean, "是否支持 developer 系统消息角色">]>, undefined>;
731
+ readonly sendSessionIdHeader: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "发送会话 ID 标头">, v.DescriptionAction<boolean, "是否在请求中携带 X-Session-ID 标头">]>, undefined>;
732
+ readonly supportsLongCacheRetention: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "长期缓存保留">, v.DescriptionAction<boolean, "是否支持长期缓存保留策略">]>, undefined>;
733
+ }, undefined>, undefined>, v.TitleAction<{
734
+ supportsDeveloperRole?: boolean | undefined;
735
+ sendSessionIdHeader?: boolean | undefined;
736
+ supportsLongCacheRetention?: boolean | undefined;
737
+ } | undefined, "OpenAI Responses 兼容配置">, v.DescriptionAction<{
738
+ supportsDeveloperRole?: boolean | undefined;
739
+ sendSessionIdHeader?: boolean | undefined;
740
+ supportsLongCacheRetention?: boolean | undefined;
741
+ } | undefined, "针对 OpenAI Responses API 的兼容性覆写选项">]>, v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
742
+ readonly supportsEagerToolInputStreaming: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, " eagerly 工具流式">, v.DescriptionAction<boolean, "是否支持工具调用的 eager 模式流式输出">]>, undefined>;
743
+ readonly supportsLongCacheRetention: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "长期缓存保留">, v.DescriptionAction<boolean, "是否支持长期缓存保留策略">]>, undefined>;
744
+ readonly sendSessionAffinityHeaders: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "发送会话亲和标头">, v.DescriptionAction<boolean, "是否在请求中携带会话亲和性标头">]>, undefined>;
745
+ readonly supportsCacheControlOnTools: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "工具缓存控制">, v.DescriptionAction<boolean, "是否支持在 tool_use 消息中使用 cache_control">]>, undefined>;
746
+ readonly supportsTemperature: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "支持温度参数">, v.DescriptionAction<boolean, "模型/接口是否支持 temperature 参数">]>, undefined>;
747
+ readonly forceAdaptiveThinking: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "强制自适应思考">, v.DescriptionAction<boolean, "是否强制启用 adaptive thinking 模式">]>, undefined>;
748
+ readonly allowEmptySignature: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.TitleAction<boolean, "允许空签名">, v.DescriptionAction<boolean, "是否允许工具调用不指定签名(sha256)">]>, undefined>;
749
+ }, undefined>, undefined>, v.TitleAction<{
750
+ supportsEagerToolInputStreaming?: boolean | undefined;
751
+ supportsLongCacheRetention?: boolean | undefined;
752
+ sendSessionAffinityHeaders?: boolean | undefined;
753
+ supportsCacheControlOnTools?: boolean | undefined;
754
+ supportsTemperature?: boolean | undefined;
755
+ forceAdaptiveThinking?: boolean | undefined;
756
+ allowEmptySignature?: boolean | undefined;
757
+ } | undefined, "Anthropic Messages 兼容配置">, v.DescriptionAction<{
758
+ supportsEagerToolInputStreaming?: boolean | undefined;
759
+ supportsLongCacheRetention?: boolean | undefined;
760
+ sendSessionAffinityHeaders?: boolean | undefined;
761
+ supportsCacheControlOnTools?: boolean | undefined;
762
+ supportsTemperature?: boolean | undefined;
763
+ forceAdaptiveThinking?: boolean | undefined;
764
+ allowEmptySignature?: boolean | undefined;
765
+ } | undefined, "针对 Anthropic Messages API 的兼容性覆写选项">]>], undefined>, v.TitleAction<{
766
+ supportsStore?: boolean | undefined;
767
+ supportsDeveloperRole?: boolean | undefined;
768
+ supportsReasoningEffort?: boolean | undefined;
769
+ supportsUsageInStreaming?: boolean | undefined;
770
+ maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
771
+ requiresToolResultName?: boolean | undefined;
772
+ requiresAssistantAfterToolResult?: boolean | undefined;
773
+ requiresThinkingAsText?: boolean | undefined;
774
+ requiresReasoningContentOnAssistantMessages?: boolean | undefined;
775
+ thinkingFormat?: "deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking" | undefined;
776
+ openRouterRouting?: unknown;
777
+ vercelGatewayRouting?: unknown;
778
+ zaiToolStream?: boolean | undefined;
779
+ supportsStrictMode?: boolean | undefined;
780
+ cacheControlFormat?: "anthropic" | undefined;
781
+ sendSessionAffinityHeaders?: boolean | undefined;
782
+ supportsLongCacheRetention?: boolean | undefined;
783
+ } | {
784
+ supportsDeveloperRole?: boolean | undefined;
785
+ sendSessionIdHeader?: boolean | undefined;
786
+ supportsLongCacheRetention?: boolean | undefined;
787
+ } | {
788
+ supportsEagerToolInputStreaming?: boolean | undefined;
789
+ supportsLongCacheRetention?: boolean | undefined;
790
+ sendSessionAffinityHeaders?: boolean | undefined;
791
+ supportsCacheControlOnTools?: boolean | undefined;
792
+ supportsTemperature?: boolean | undefined;
793
+ forceAdaptiveThinking?: boolean | undefined;
794
+ allowEmptySignature?: boolean | undefined;
795
+ } | undefined, "兼容配置">, v.DescriptionAction<{
796
+ supportsStore?: boolean | undefined;
797
+ supportsDeveloperRole?: boolean | undefined;
798
+ supportsReasoningEffort?: boolean | undefined;
799
+ supportsUsageInStreaming?: boolean | undefined;
800
+ maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
801
+ requiresToolResultName?: boolean | undefined;
802
+ requiresAssistantAfterToolResult?: boolean | undefined;
803
+ requiresThinkingAsText?: boolean | undefined;
804
+ requiresReasoningContentOnAssistantMessages?: boolean | undefined;
805
+ thinkingFormat?: "deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking" | undefined;
806
+ openRouterRouting?: unknown;
807
+ vercelGatewayRouting?: unknown;
808
+ zaiToolStream?: boolean | undefined;
809
+ supportsStrictMode?: boolean | undefined;
810
+ cacheControlFormat?: "anthropic" | undefined;
811
+ sendSessionAffinityHeaders?: boolean | undefined;
812
+ supportsLongCacheRetention?: boolean | undefined;
813
+ } | {
814
+ supportsDeveloperRole?: boolean | undefined;
815
+ sendSessionIdHeader?: boolean | undefined;
816
+ supportsLongCacheRetention?: boolean | undefined;
817
+ } | {
818
+ supportsEagerToolInputStreaming?: boolean | undefined;
819
+ supportsLongCacheRetention?: boolean | undefined;
820
+ sendSessionAffinityHeaders?: boolean | undefined;
821
+ supportsCacheControlOnTools?: boolean | undefined;
822
+ supportsTemperature?: boolean | undefined;
823
+ forceAdaptiveThinking?: boolean | undefined;
824
+ allowEmptySignature?: boolean | undefined;
825
+ } | undefined, "模型 API 兼容性覆写选项,支持 OpenAI Completions、OpenAI Responses、Anthropic Messages 三种格式">]>, {
826
+ readonly supportsDeveloperRole: false;
827
+ }>, v.TitleAction<{
828
+ supportsStore?: boolean | undefined;
829
+ supportsDeveloperRole?: boolean | undefined;
830
+ supportsReasoningEffort?: boolean | undefined;
831
+ supportsUsageInStreaming?: boolean | undefined;
832
+ maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
833
+ requiresToolResultName?: boolean | undefined;
834
+ requiresAssistantAfterToolResult?: boolean | undefined;
835
+ requiresThinkingAsText?: boolean | undefined;
836
+ requiresReasoningContentOnAssistantMessages?: boolean | undefined;
837
+ thinkingFormat?: "deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking" | undefined;
838
+ openRouterRouting?: unknown;
839
+ vercelGatewayRouting?: unknown;
840
+ zaiToolStream?: boolean | undefined;
841
+ supportsStrictMode?: boolean | undefined;
842
+ cacheControlFormat?: "anthropic" | undefined;
843
+ sendSessionAffinityHeaders?: boolean | undefined;
844
+ supportsLongCacheRetention?: boolean | undefined;
845
+ } | {
846
+ supportsDeveloperRole?: boolean | undefined;
847
+ sendSessionIdHeader?: boolean | undefined;
848
+ supportsLongCacheRetention?: boolean | undefined;
849
+ } | {
850
+ supportsEagerToolInputStreaming?: boolean | undefined;
851
+ supportsLongCacheRetention?: boolean | undefined;
852
+ sendSessionAffinityHeaders?: boolean | undefined;
853
+ supportsCacheControlOnTools?: boolean | undefined;
854
+ supportsTemperature?: boolean | undefined;
855
+ forceAdaptiveThinking?: boolean | undefined;
856
+ allowEmptySignature?: boolean | undefined;
857
+ } | undefined, "兼容配置">, v.DescriptionAction<{
858
+ supportsStore?: boolean | undefined;
859
+ supportsDeveloperRole?: boolean | undefined;
860
+ supportsReasoningEffort?: boolean | undefined;
861
+ supportsUsageInStreaming?: boolean | undefined;
862
+ maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
863
+ requiresToolResultName?: boolean | undefined;
864
+ requiresAssistantAfterToolResult?: boolean | undefined;
865
+ requiresThinkingAsText?: boolean | undefined;
866
+ requiresReasoningContentOnAssistantMessages?: boolean | undefined;
867
+ thinkingFormat?: "deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking" | undefined;
868
+ openRouterRouting?: unknown;
869
+ vercelGatewayRouting?: unknown;
870
+ zaiToolStream?: boolean | undefined;
871
+ supportsStrictMode?: boolean | undefined;
872
+ cacheControlFormat?: "anthropic" | undefined;
873
+ sendSessionAffinityHeaders?: boolean | undefined;
874
+ supportsLongCacheRetention?: boolean | undefined;
875
+ } | {
876
+ supportsDeveloperRole?: boolean | undefined;
877
+ sendSessionIdHeader?: boolean | undefined;
878
+ supportsLongCacheRetention?: boolean | undefined;
879
+ } | {
880
+ supportsEagerToolInputStreaming?: boolean | undefined;
881
+ supportsLongCacheRetention?: boolean | undefined;
882
+ sendSessionAffinityHeaders?: boolean | undefined;
883
+ supportsCacheControlOnTools?: boolean | undefined;
884
+ supportsTemperature?: boolean | undefined;
885
+ forceAdaptiveThinking?: boolean | undefined;
886
+ allowEmptySignature?: boolean | undefined;
887
+ } | undefined, "API 兼容性覆写选项">]>;
888
+ }, undefined>, v.TitleAction<{
889
+ provider: string;
890
+ baseUrl: string;
891
+ reasoning: boolean;
892
+ input: ("text" | "image")[];
893
+ cost: {
894
+ input: number;
895
+ output: number;
896
+ cacheRead: number;
897
+ cacheWrite: number;
898
+ };
899
+ contextWindow: number;
900
+ maxTokens: number;
901
+ headers?: {
902
+ [x: string]: string;
903
+ } | undefined;
904
+ compat: {
905
+ supportsStore?: boolean | undefined;
906
+ supportsDeveloperRole?: boolean | undefined;
907
+ supportsReasoningEffort?: boolean | undefined;
908
+ supportsUsageInStreaming?: boolean | undefined;
909
+ maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
910
+ requiresToolResultName?: boolean | undefined;
911
+ requiresAssistantAfterToolResult?: boolean | undefined;
912
+ requiresThinkingAsText?: boolean | undefined;
913
+ requiresReasoningContentOnAssistantMessages?: boolean | undefined;
914
+ thinkingFormat?: "deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking" | undefined;
915
+ openRouterRouting?: unknown;
916
+ vercelGatewayRouting?: unknown;
917
+ zaiToolStream?: boolean | undefined;
918
+ supportsStrictMode?: boolean | undefined;
919
+ cacheControlFormat?: "anthropic" | undefined;
920
+ sendSessionAffinityHeaders?: boolean | undefined;
921
+ supportsLongCacheRetention?: boolean | undefined;
922
+ } | {
923
+ supportsDeveloperRole?: boolean | undefined;
924
+ sendSessionIdHeader?: boolean | undefined;
925
+ supportsLongCacheRetention?: boolean | undefined;
926
+ } | {
927
+ supportsEagerToolInputStreaming?: boolean | undefined;
928
+ supportsLongCacheRetention?: boolean | undefined;
929
+ sendSessionAffinityHeaders?: boolean | undefined;
930
+ supportsCacheControlOnTools?: boolean | undefined;
931
+ supportsTemperature?: boolean | undefined;
932
+ forceAdaptiveThinking?: boolean | undefined;
933
+ allowEmptySignature?: boolean | undefined;
934
+ } | undefined;
935
+ }, "模型定义">, v.DescriptionAction<{
936
+ provider: string;
937
+ baseUrl: string;
938
+ reasoning: boolean;
939
+ input: ("text" | "image")[];
940
+ cost: {
941
+ input: number;
942
+ output: number;
943
+ cacheRead: number;
944
+ cacheWrite: number;
945
+ };
946
+ contextWindow: number;
947
+ maxTokens: number;
948
+ headers?: {
949
+ [x: string]: string;
950
+ } | undefined;
951
+ compat: {
952
+ supportsStore?: boolean | undefined;
953
+ supportsDeveloperRole?: boolean | undefined;
954
+ supportsReasoningEffort?: boolean | undefined;
955
+ supportsUsageInStreaming?: boolean | undefined;
956
+ maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
957
+ requiresToolResultName?: boolean | undefined;
958
+ requiresAssistantAfterToolResult?: boolean | undefined;
959
+ requiresThinkingAsText?: boolean | undefined;
960
+ requiresReasoningContentOnAssistantMessages?: boolean | undefined;
961
+ thinkingFormat?: "deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking" | undefined;
962
+ openRouterRouting?: unknown;
963
+ vercelGatewayRouting?: unknown;
964
+ zaiToolStream?: boolean | undefined;
965
+ supportsStrictMode?: boolean | undefined;
966
+ cacheControlFormat?: "anthropic" | undefined;
967
+ sendSessionAffinityHeaders?: boolean | undefined;
968
+ supportsLongCacheRetention?: boolean | undefined;
969
+ } | {
970
+ supportsDeveloperRole?: boolean | undefined;
971
+ sendSessionIdHeader?: boolean | undefined;
972
+ supportsLongCacheRetention?: boolean | undefined;
973
+ } | {
974
+ supportsEagerToolInputStreaming?: boolean | undefined;
975
+ supportsLongCacheRetention?: boolean | undefined;
976
+ sendSessionAffinityHeaders?: boolean | undefined;
977
+ supportsCacheControlOnTools?: boolean | undefined;
978
+ supportsTemperature?: boolean | undefined;
979
+ forceAdaptiveThinking?: boolean | undefined;
980
+ allowEmptySignature?: boolean | undefined;
981
+ } | undefined;
982
+ }, "pi-ai 模型的核心配置结构,包含模型标识、API 参数、费用及兼容性设置">]>, undefined>, import("@piying/valibot-visit").RawConfigAction<"viewRawConfig", {
983
+ provider: string;
984
+ baseUrl: string;
985
+ reasoning: boolean;
986
+ input: ("text" | "image")[];
987
+ cost: {
988
+ input: number;
989
+ output: number;
990
+ cacheRead: number;
991
+ cacheWrite: number;
992
+ };
993
+ contextWindow: number;
994
+ maxTokens: number;
995
+ headers?: {
996
+ [x: string]: string;
997
+ } | undefined;
998
+ compat: {
999
+ supportsStore?: boolean | undefined;
1000
+ supportsDeveloperRole?: boolean | undefined;
1001
+ supportsReasoningEffort?: boolean | undefined;
1002
+ supportsUsageInStreaming?: boolean | undefined;
1003
+ maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
1004
+ requiresToolResultName?: boolean | undefined;
1005
+ requiresAssistantAfterToolResult?: boolean | undefined;
1006
+ requiresThinkingAsText?: boolean | undefined;
1007
+ requiresReasoningContentOnAssistantMessages?: boolean | undefined;
1008
+ thinkingFormat?: "deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking" | undefined;
1009
+ openRouterRouting?: unknown;
1010
+ vercelGatewayRouting?: unknown;
1011
+ zaiToolStream?: boolean | undefined;
1012
+ supportsStrictMode?: boolean | undefined;
1013
+ cacheControlFormat?: "anthropic" | undefined;
1014
+ sendSessionAffinityHeaders?: boolean | undefined;
1015
+ supportsLongCacheRetention?: boolean | undefined;
1016
+ } | {
1017
+ supportsDeveloperRole?: boolean | undefined;
1018
+ sendSessionIdHeader?: boolean | undefined;
1019
+ supportsLongCacheRetention?: boolean | undefined;
1020
+ } | {
1021
+ supportsEagerToolInputStreaming?: boolean | undefined;
1022
+ supportsLongCacheRetention?: boolean | undefined;
1023
+ sendSessionAffinityHeaders?: boolean | undefined;
1024
+ supportsCacheControlOnTools?: boolean | undefined;
1025
+ supportsTemperature?: boolean | undefined;
1026
+ forceAdaptiveThinking?: boolean | undefined;
1027
+ allowEmptySignature?: boolean | undefined;
1028
+ } | undefined;
1029
+ } | undefined, import("@piying/view-angular-core").AnyCoreSchemaHandle>]>;
1030
+ }, undefined>, v.TransformAction<{
1031
+ provider: "deepseek" | "amazon-bedrock" | "anthropic" | "google" | "google-vertex" | "openai" | "azure-openai-responses" | "openai-codex" | "github-copilot" | "xai" | "groq" | "cerebras" | "openrouter" | "vercel-ai-gateway" | "zai" | "mistral" | "minimax" | "minimax-cn" | "moonshotai" | "moonshotai-cn" | "huggingface" | "fireworks" | "together" | "opencode" | "opencode-go" | "kimi-coding" | "cloudflare-workers-ai" | "cloudflare-ai-gateway" | "xiaomi" | "xiaomi-token-plan-cn" | "xiaomi-token-plan-ams" | "xiaomi-token-plan-sgp" | "ant-ling" | "nvidia" | "zai-coding-cn" | "openai-completions" | "openai-responses" | "anthropic-messages";
1032
+ model: string;
1033
+ name?: string | undefined;
1034
+ apiKey?: string | undefined;
1035
+ config?: {
1036
+ provider: string;
1037
+ baseUrl: string;
1038
+ reasoning: boolean;
1039
+ input: ("text" | "image")[];
1040
+ cost: {
1041
+ input: number;
1042
+ output: number;
1043
+ cacheRead: number;
1044
+ cacheWrite: number;
1045
+ };
1046
+ contextWindow: number;
1047
+ maxTokens: number;
1048
+ headers?: {
1049
+ [x: string]: string;
1050
+ } | undefined;
1051
+ compat: {
1052
+ supportsStore?: boolean | undefined;
1053
+ supportsDeveloperRole?: boolean | undefined;
1054
+ supportsReasoningEffort?: boolean | undefined;
1055
+ supportsUsageInStreaming?: boolean | undefined;
1056
+ maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
1057
+ requiresToolResultName?: boolean | undefined;
1058
+ requiresAssistantAfterToolResult?: boolean | undefined;
1059
+ requiresThinkingAsText?: boolean | undefined;
1060
+ requiresReasoningContentOnAssistantMessages?: boolean | undefined;
1061
+ thinkingFormat?: "deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking" | undefined;
1062
+ openRouterRouting?: unknown;
1063
+ vercelGatewayRouting?: unknown;
1064
+ zaiToolStream?: boolean | undefined;
1065
+ supportsStrictMode?: boolean | undefined;
1066
+ cacheControlFormat?: "anthropic" | undefined;
1067
+ sendSessionAffinityHeaders?: boolean | undefined;
1068
+ supportsLongCacheRetention?: boolean | undefined;
1069
+ } | {
1070
+ supportsDeveloperRole?: boolean | undefined;
1071
+ sendSessionIdHeader?: boolean | undefined;
1072
+ supportsLongCacheRetention?: boolean | undefined;
1073
+ } | {
1074
+ supportsEagerToolInputStreaming?: boolean | undefined;
1075
+ supportsLongCacheRetention?: boolean | undefined;
1076
+ sendSessionAffinityHeaders?: boolean | undefined;
1077
+ supportsCacheControlOnTools?: boolean | undefined;
1078
+ supportsTemperature?: boolean | undefined;
1079
+ forceAdaptiveThinking?: boolean | undefined;
1080
+ allowEmptySignature?: boolean | undefined;
1081
+ } | undefined;
1082
+ } | undefined;
1083
+ }, {
1084
+ name: string;
1085
+ provider: "deepseek" | "amazon-bedrock" | "anthropic" | "google" | "google-vertex" | "openai" | "azure-openai-responses" | "openai-codex" | "github-copilot" | "xai" | "groq" | "cerebras" | "openrouter" | "vercel-ai-gateway" | "zai" | "mistral" | "minimax" | "minimax-cn" | "moonshotai" | "moonshotai-cn" | "huggingface" | "fireworks" | "together" | "opencode" | "opencode-go" | "kimi-coding" | "cloudflare-workers-ai" | "cloudflare-ai-gateway" | "xiaomi" | "xiaomi-token-plan-cn" | "xiaomi-token-plan-ams" | "xiaomi-token-plan-sgp" | "ant-ling" | "nvidia" | "zai-coding-cn" | "openai-completions" | "openai-responses" | "anthropic-messages";
1086
+ model: string;
1087
+ apiKey?: string | undefined;
1088
+ config?: {
1089
+ provider: string;
1090
+ baseUrl: string;
1091
+ reasoning: boolean;
1092
+ input: ("text" | "image")[];
1093
+ cost: {
1094
+ input: number;
1095
+ output: number;
1096
+ cacheRead: number;
1097
+ cacheWrite: number;
1098
+ };
1099
+ contextWindow: number;
1100
+ maxTokens: number;
1101
+ headers?: {
1102
+ [x: string]: string;
1103
+ } | undefined;
1104
+ compat: {
1105
+ supportsStore?: boolean | undefined;
1106
+ supportsDeveloperRole?: boolean | undefined;
1107
+ supportsReasoningEffort?: boolean | undefined;
1108
+ supportsUsageInStreaming?: boolean | undefined;
1109
+ maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
1110
+ requiresToolResultName?: boolean | undefined;
1111
+ requiresAssistantAfterToolResult?: boolean | undefined;
1112
+ requiresThinkingAsText?: boolean | undefined;
1113
+ requiresReasoningContentOnAssistantMessages?: boolean | undefined;
1114
+ thinkingFormat?: "deepseek" | "openai" | "openrouter" | "zai" | "together" | "ant-ling" | "qwen" | "qwen-chat-template" | "string-thinking" | undefined;
1115
+ openRouterRouting?: unknown;
1116
+ vercelGatewayRouting?: unknown;
1117
+ zaiToolStream?: boolean | undefined;
1118
+ supportsStrictMode?: boolean | undefined;
1119
+ cacheControlFormat?: "anthropic" | undefined;
1120
+ sendSessionAffinityHeaders?: boolean | undefined;
1121
+ supportsLongCacheRetention?: boolean | undefined;
1122
+ } | {
1123
+ supportsDeveloperRole?: boolean | undefined;
1124
+ sendSessionIdHeader?: boolean | undefined;
1125
+ supportsLongCacheRetention?: boolean | undefined;
1126
+ } | {
1127
+ supportsEagerToolInputStreaming?: boolean | undefined;
1128
+ supportsLongCacheRetention?: boolean | undefined;
1129
+ sendSessionAffinityHeaders?: boolean | undefined;
1130
+ supportsCacheControlOnTools?: boolean | undefined;
1131
+ supportsTemperature?: boolean | undefined;
1132
+ forceAdaptiveThinking?: boolean | undefined;
1133
+ allowEmptySignature?: boolean | undefined;
1134
+ } | undefined;
1135
+ } | undefined;
1136
+ }>]>;
1137
+ export type ModelConfigInputType = v.InferInput<typeof ModelConfigDefine>;
1138
+ export type ModelConfigOutputType = v.InferOutput<typeof ModelConfigDefine>;