buckyos 0.7.122 → 0.7.124

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.
@@ -1,15 +1,14 @@
1
1
  import { kRPCClient } from './krpc_client';
2
- export declare const AICC_SERVICE_NAME = "aicc";
3
2
  export declare const AICC_SERVICE_UNIQUE_ID = "aicc";
4
3
  export declare const AICC_SERVICE_SERVICE_NAME = "aicc";
5
4
  export declare const AICC_SERVICE_SERVICE_PORT = 4040;
6
5
  export declare const AICC_AI_METHODS: {
7
- readonly LLM_CHAT: "llm.chat";
8
- readonly LLM_COMPLETION: "llm.completion";
6
+ readonly CHAT_COMPLETIONS_CREATE: "chat.completions.create";
7
+ readonly IMAGES_GENERATE: "images.generate";
9
8
  readonly EMBEDDING_TEXT: "embedding.text";
10
9
  readonly EMBEDDING_MULTIMODAL: "embedding.multimodal";
11
10
  readonly RERANK: "rerank";
12
- readonly IMAGE_TXT2IMG: "image.txt2img";
11
+ readonly DECISION_EVALUATE: "decision.evaluate";
13
12
  readonly IMAGE_IMG2IMG: "image.img2img";
14
13
  readonly IMAGE_INPAINT: "image.inpaint";
15
14
  readonly IMAGE_UPSCALE: "image.upscale";
@@ -29,396 +28,615 @@ export declare const AICC_AI_METHODS: {
29
28
  readonly VIDEO_UPSCALE: "video.upscale";
30
29
  readonly AGENT_COMPUTER_USE: "agent.computer_use";
31
30
  };
32
- export declare const AICC_CONTROL_METHODS: {
31
+ export declare const AICC_CORE_METHODS: {
32
+ readonly ROUTE_RESOLVE: "route.resolve";
33
+ readonly HELPER_LLM_CHAT: "helper.llm_chat";
34
+ readonly HELPER_TEXT_TO_IMAGE: "helper.text_to_image";
33
35
  readonly CANCEL: "cancel";
34
- readonly RELOAD_SETTINGS: "reload_settings";
36
+ };
37
+ export declare const AICC_MANAGEMENT_METHODS: {
38
+ readonly SERVICE_RELOAD_SETTINGS: "service.reload_settings";
39
+ readonly QUOTA_QUERY: "quota.query";
40
+ readonly USAGE_QUERY: "usage.query";
41
+ readonly TRACE_QUERY: "trace.query";
42
+ readonly ROUTING_GET: "routing.get";
43
+ readonly ROUTING_PREVIEW: "routing.preview";
44
+ readonly ROUTING_UPDATE: "routing.update";
45
+ readonly PROVIDER_CATALOG: "provider.catalog";
46
+ readonly PROTOCOL_ADAPTER_LIST: "protocol_adapter.list";
47
+ readonly PROVIDER_VALIDATE: "provider.validate";
48
+ readonly PROVIDER_ADD: "provider.add";
49
+ readonly PROVIDER_LIST: "provider.list";
50
+ readonly PROVIDER_HEALTH: "provider.health";
51
+ readonly PROVIDER_UPDATE: "provider.update";
52
+ readonly PROVIDER_DELETE: "provider.delete";
53
+ readonly PROVIDER_REFRESH_MODELS: "provider.refresh_models";
54
+ readonly MODELS_LIST: "models.list";
55
+ readonly DRIVER_METADATA_UPDATE_GET: "driver_metadata_update.get";
56
+ readonly DRIVER_METADATA_UPDATE_SET: "driver_metadata_update.set";
57
+ };
58
+ export declare const AICC_METHODS: {
35
59
  readonly SERVICE_RELOAD_SETTINGS: "service.reload_settings";
36
60
  readonly QUOTA_QUERY: "quota.query";
61
+ readonly USAGE_QUERY: "usage.query";
62
+ readonly TRACE_QUERY: "trace.query";
63
+ readonly ROUTING_GET: "routing.get";
64
+ readonly ROUTING_PREVIEW: "routing.preview";
65
+ readonly ROUTING_UPDATE: "routing.update";
66
+ readonly PROVIDER_CATALOG: "provider.catalog";
67
+ readonly PROTOCOL_ADAPTER_LIST: "protocol_adapter.list";
68
+ readonly PROVIDER_VALIDATE: "provider.validate";
69
+ readonly PROVIDER_ADD: "provider.add";
37
70
  readonly PROVIDER_LIST: "provider.list";
38
71
  readonly PROVIDER_HEALTH: "provider.health";
72
+ readonly PROVIDER_UPDATE: "provider.update";
73
+ readonly PROVIDER_DELETE: "provider.delete";
74
+ readonly PROVIDER_REFRESH_MODELS: "provider.refresh_models";
75
+ readonly MODELS_LIST: "models.list";
76
+ readonly DRIVER_METADATA_UPDATE_GET: "driver_metadata_update.get";
77
+ readonly DRIVER_METADATA_UPDATE_SET: "driver_metadata_update.set";
78
+ readonly ROUTE_RESOLVE: "route.resolve";
79
+ readonly HELPER_LLM_CHAT: "helper.llm_chat";
80
+ readonly HELPER_TEXT_TO_IMAGE: "helper.text_to_image";
81
+ readonly CANCEL: "cancel";
82
+ readonly CHAT_COMPLETIONS_CREATE: "chat.completions.create";
83
+ readonly IMAGES_GENERATE: "images.generate";
84
+ readonly EMBEDDING_TEXT: "embedding.text";
85
+ readonly EMBEDDING_MULTIMODAL: "embedding.multimodal";
86
+ readonly RERANK: "rerank";
87
+ readonly DECISION_EVALUATE: "decision.evaluate";
88
+ readonly IMAGE_IMG2IMG: "image.img2img";
89
+ readonly IMAGE_INPAINT: "image.inpaint";
90
+ readonly IMAGE_UPSCALE: "image.upscale";
91
+ readonly IMAGE_BG_REMOVE: "image.bg_remove";
92
+ readonly VISION_OCR: "vision.ocr";
93
+ readonly VISION_CAPTION: "vision.caption";
94
+ readonly VISION_DETECT: "vision.detect";
95
+ readonly VISION_SEGMENT: "vision.segment";
96
+ readonly AUDIO_TTS: "audio.tts";
97
+ readonly AUDIO_ASR: "audio.asr";
98
+ readonly AUDIO_MUSIC: "audio.music";
99
+ readonly AUDIO_ENHANCE: "audio.enhance";
100
+ readonly VIDEO_TXT2VIDEO: "video.txt2video";
101
+ readonly VIDEO_IMG2VIDEO: "video.img2video";
102
+ readonly VIDEO_VIDEO2VIDEO: "video.video2video";
103
+ readonly VIDEO_EXTEND: "video.extend";
104
+ readonly VIDEO_UPSCALE: "video.upscale";
105
+ readonly AGENT_COMPUTER_USE: "agent.computer_use";
39
106
  };
107
+ export type AiccAiMethod = typeof AICC_AI_METHODS[keyof typeof AICC_AI_METHODS];
108
+ export type AiccMethod = typeof AICC_METHODS[keyof typeof AICC_METHODS];
109
+ export type JsonValue = null | boolean | number | string | JsonValue[] | {
110
+ [key: string]: JsonValue;
111
+ };
112
+ export type ApiType = 'llm' | 'embedding.text' | 'embedding.multimodal' | 'decision' | 'rerank' | 'image.txt2img' | 'image.img2img' | 'image.inpaint' | 'image.upscale' | 'image.bg_remove' | 'vision.ocr' | 'vision.caption' | 'vision.detect' | 'vision.segment' | 'audio.tts' | 'audio.asr' | 'audio.music' | 'audio.enhance' | 'video.txt2video' | 'video.img2video' | 'video.video2video' | 'video.extend' | 'video.upscale' | 'agent.computer_use';
113
+ export type Capability = 'llm' | 'embedding' | 'decision' | 'rerank' | 'image' | 'vision' | 'audio' | 'video' | 'agent';
114
+ export type Feature = string;
40
115
  export declare const AICC_FEATURES: {
41
116
  readonly PLAN: "plan";
42
- readonly TOOL_CALLING: "tool_calling";
43
- readonly JSON_OUTPUT: "json_output";
117
+ readonly TOOL_CALL: "tool_call";
118
+ readonly JSON_SCHEMA: "json_schema";
44
119
  readonly WEB_SEARCH: "web_search";
45
120
  readonly VISION: "vision";
121
+ readonly IMAGE_GENERATION: "image_generation";
46
122
  readonly ASR: "asr";
47
123
  readonly VIDEO_UNDERSTAND: "video_understand";
48
124
  };
49
- export type AiccAiMethod = typeof AICC_AI_METHODS[keyof typeof AICC_AI_METHODS];
50
- export type AiccControlMethod = typeof AICC_CONTROL_METHODS[keyof typeof AICC_CONTROL_METHODS];
51
- export type AiccCapability = 'llm' | 'embedding' | 'rerank' | 'image' | 'vision' | 'audio' | 'video' | 'agent';
52
- export type AiccFeature = typeof AICC_FEATURES[keyof typeof AICC_FEATURES] | string;
53
- export type AiccRespFormat = 'text' | 'json';
54
- export type AiccRoutePolicyProfile = 'cheap' | 'fast' | 'balanced' | 'quality';
55
- export type AiccMethodStatus = 'succeeded' | 'running' | 'failed';
56
- export interface AiccResourceUrl {
125
+ export declare const AICC_EXECUTION_MODES: {
126
+ readonly IMMEDIATE: "immediate";
127
+ readonly STREAM: "stream";
128
+ };
129
+ export type AiccExecutionMode = typeof AICC_EXECUTION_MODES[keyof typeof AICC_EXECUTION_MODES];
130
+ export type ResourceRef = {
57
131
  kind: 'url';
58
132
  url: string;
59
- mime_hint?: string | null;
60
- }
61
- export interface AiccResourceBase64 {
133
+ mime_hint?: string;
134
+ } | {
62
135
  kind: 'base64';
63
136
  mime: string;
64
137
  data_base64: string;
65
- }
66
- export interface AiccResourceNamedObject {
138
+ } | {
67
139
  kind: 'named_object';
68
140
  obj_id: string;
69
- }
70
- export type AiccResourceRef = AiccResourceUrl | AiccResourceBase64 | AiccResourceNamedObject;
71
- export type AiccAiRole = 'system' | 'user' | 'assistant' | 'tool' | 'developer';
72
- export type AiccToolResultContent = {
73
- type: 'text';
74
- text: string;
75
- } | {
76
- type: 'image';
77
- source: AiccResourceRef;
78
- } | {
79
- type: 'document';
80
- source: AiccResourceRef;
81
- title?: string | null;
82
141
  };
83
- export type AiccContent = {
142
+ export type AiRole = 'system' | 'user' | 'assistant' | 'tool' | 'developer';
143
+ export type AiToolResultContent = {
84
144
  type: 'text';
85
145
  text: string;
86
146
  } | {
87
147
  type: 'image';
88
- source: AiccResourceRef;
148
+ source: ResourceRef;
89
149
  } | {
90
150
  type: 'document';
91
- source: AiccResourceRef;
92
- title?: string | null;
93
- } | {
151
+ source: ResourceRef;
152
+ title?: string;
153
+ };
154
+ export type AiContent = AiToolResultContent | {
94
155
  type: 'tool_use';
95
156
  call_id: string;
96
157
  name: string;
97
- args: Record<string, unknown>;
158
+ args: Record<string, JsonValue>;
98
159
  } | {
99
160
  type: 'tool_result';
100
161
  call_id: string;
101
- content: AiccToolResultContent[];
162
+ content: AiToolResultContent[];
102
163
  is_error?: boolean;
103
164
  } | {
104
165
  type: 'thinking';
105
- summary?: string | null;
106
- text?: string | null;
107
- provider_metadata?: unknown;
166
+ summary?: string;
167
+ text?: string;
168
+ provider_metadata?: JsonValue;
108
169
  } | {
109
170
  type: 'provider_state';
110
171
  provider: string;
111
- value: unknown;
172
+ value: JsonValue;
112
173
  };
113
- export interface AiccMessage {
114
- role: AiccAiRole;
115
- content: AiccContent[];
174
+ export interface AiMessage {
175
+ role: AiRole;
176
+ content: AiContent[];
116
177
  }
117
- export interface AiccToolSpec {
178
+ export interface AiToolSpec {
179
+ type?: string;
118
180
  name: string;
119
181
  description: string;
120
- args_schema: Record<string, unknown>;
121
- output_schema: unknown;
182
+ args_json_schema: JsonValue;
183
+ output_schema?: JsonValue;
122
184
  }
123
- export interface AiccModelSpec {
124
- alias: string;
125
- provider_model_hint?: string | null;
185
+ export interface LlmJsonSchema {
186
+ name?: string;
187
+ schema: JsonValue;
188
+ strict?: boolean;
126
189
  }
127
- export interface AiccRequirements {
128
- must_features?: AiccFeature[];
129
- max_latency_ms?: number;
130
- max_cost_usd?: number;
131
- resp_format?: AiccRespFormat;
132
- extra?: unknown;
190
+ export interface LlmResponseFormat {
191
+ type: 'text' | 'json' | 'json_object' | 'json_schema';
192
+ json_schema?: LlmJsonSchema;
133
193
  }
134
- export interface AiccPayload {
135
- input_json?: unknown;
136
- resources?: AiccResourceRef[];
137
- options?: unknown;
194
+ export interface AiUsage {
195
+ input_tokens?: number;
196
+ output_tokens?: number;
197
+ total_tokens?: number;
198
+ request_units?: number;
138
199
  }
139
- export interface AiccRoutePolicy {
140
- profile?: AiccRoutePolicyProfile;
141
- allow_fallback?: boolean;
142
- runtime_failover?: boolean;
143
- explain?: boolean;
144
- }
145
- export interface AiccTaskOptions {
146
- parent_id?: number | null;
147
- }
148
- export interface AiccMethodRequest {
149
- capability: AiccCapability;
150
- model: AiccModelSpec;
151
- requirements: AiccRequirements;
152
- payload: AiccPayload;
153
- policy?: AiccRoutePolicy | null;
154
- idempotency_key?: string | null;
155
- task_options?: AiccTaskOptions | null;
156
- }
157
- export interface AiccUsage {
158
- input_tokens?: number | null;
159
- output_tokens?: number | null;
160
- total_tokens?: number | null;
161
- }
162
- export interface AiccCost {
200
+ export interface Money {
163
201
  amount: number;
164
202
  currency: string;
165
203
  }
166
- export interface AiccArtifact {
204
+ export type AiCost = Money;
205
+ export interface AiArtifact {
167
206
  name: string;
168
- resource: AiccResourceRef;
169
- mime?: string | null;
170
- metadata?: unknown;
207
+ resource: ResourceRef;
208
+ mime?: string;
209
+ metadata?: JsonValue;
210
+ }
211
+ export type AiccErrorCode = 'invalid_request' | 'invalid_method' | 'schema_validation_failed' | 'invalid_model_name' | 'resource_invalid' | 'no_provider_available' | 'no_candidate_model' | 'fallback_not_allowed' | 'provider_start_failed' | 'provider_error' | 'unsupported_execution_mode' | 'timeout' | 'budget_exceeded' | 'policy_denied' | 'idempotency_conflict' | 'settings_revision_conflict' | 'cancelled' | 'internal_error';
212
+ export interface AiccError {
213
+ code: AiccErrorCode;
214
+ message: string;
215
+ provider_code?: string;
216
+ retriable?: boolean;
217
+ details?: JsonValue;
218
+ }
219
+ export interface SettingsRevisionConflictDetails {
220
+ expected_revision: number;
221
+ actual_revision: number;
222
+ }
223
+ export interface RouteTraceAttempt {
224
+ step: number;
225
+ exact_model: string;
226
+ started_at: string;
227
+ ended_at?: string;
228
+ outcome: 'succeeded' | 'failed' | 'skipped';
229
+ error_code?: AiccErrorCode;
230
+ fallback_reason?: string;
231
+ }
232
+ export interface RouteTrace {
233
+ attempts: RouteTraceAttempt[];
234
+ final_model?: string;
171
235
  }
172
- export interface AiccToolCall {
236
+ export interface AiToolCall {
173
237
  name: string;
174
- args: Record<string, unknown>;
238
+ args: Record<string, JsonValue>;
175
239
  call_id: string;
176
240
  }
177
- export interface AiccResponse {
178
- message: AiccMessage;
179
- usage?: AiccUsage | null;
180
- cost?: AiccCost;
181
- finish_reason?: string;
182
- provider_task_ref?: string | null;
183
- extra?: unknown;
184
- }
185
- export interface AiccMethodResponse {
186
- task_id: string;
187
- status: AiccMethodStatus;
188
- result?: AiccResponse | null;
189
- event_ref?: string | null;
190
- }
191
- export interface AiccCancelResponse {
192
- task_id: string;
193
- accepted: boolean;
194
- }
195
- export interface AiccQuotaQueryRequest {
196
- capability?: AiccCapability;
197
- method?: AiccAiMethod | string;
198
- }
199
- export interface AiccQuotaQueryResponse {
200
- quota: {
201
- state: string;
202
- remaining_request_units?: number;
203
- remaining_cost_usd?: number;
204
- reset_at?: string;
205
- [key: string]: unknown;
206
- };
241
+ export type AiMethodStatus = 'succeeded' | 'running' | 'failed';
242
+ export interface AiTaskOptions {
243
+ parent_id?: string;
207
244
  }
208
- export interface AiccProviderListRequest {
209
- method?: AiccAiMethod | string;
210
- }
211
- export interface AiccProviderHealthRequest {
212
- exact_model?: string;
213
- provider?: string;
214
- }
215
- export type AiccModelInput = string | AiccModelSpec;
216
- export interface AiccTypedMethodCall<TInput> {
217
- model: AiccModelInput;
218
- input: TInput;
219
- requirements?: AiccRequirements;
220
- resources?: AiccResourceRef[];
221
- options?: unknown;
222
- policy?: AiccRoutePolicy | null;
223
- idempotency_key?: string | null;
224
- task_options?: AiccTaskOptions | null;
225
- }
226
- export type AiccTypedResponse<TExtra = unknown> = Omit<AiccResponse, 'extra'> & {
227
- extra?: TExtra;
228
- };
229
- export type AiccTypedMethodResponse<TExtra = unknown> = Omit<AiccMethodResponse, 'result'> & {
230
- result?: AiccTypedResponse<TExtra> | null;
231
- };
232
- export interface AiccGenerationOutputOptions {
245
+ export interface AiOutputOptions {
233
246
  media_type?: string;
234
247
  size?: string;
235
248
  sample_rate?: number;
236
249
  fps?: number;
237
250
  }
238
- export interface AiccGenerationParams {
239
- temperature?: number;
240
- top_p?: number;
241
- max_output_tokens?: number;
242
- seed?: number;
243
- stop?: string[];
244
- output?: AiccGenerationOutputOptions;
245
- }
246
- export interface AiccJsonSchemaResponseFormat {
247
- type: 'json_schema';
248
- json_schema: {
249
- name: string;
250
- schema: Record<string, unknown>;
251
- strict?: boolean;
252
- };
251
+ export interface ModelRequirement {
252
+ decision?: DecisionRequirements;
253
+ streaming?: boolean;
254
+ tool_call?: boolean;
255
+ json_schema?: boolean;
256
+ web_search?: boolean;
257
+ vision?: boolean;
258
+ image_generation?: boolean;
259
+ min_context_tokens?: number;
253
260
  }
254
- export type AiccLlmResponseFormat = {
255
- type: 'text';
256
- } | {
257
- type: 'json_object';
258
- } | AiccJsonSchemaResponseFormat;
259
- export interface AiccLlmTool {
260
- type: 'function';
261
- name: string;
262
- description?: string;
263
- args_json_schema: Record<string, unknown>;
261
+ export interface ModelDisable extends Omit<ModelRequirement, "decision"> {
264
262
  }
265
- export interface AiccLlmChatInput extends AiccGenerationParams {
266
- messages: AiccMessage[];
267
- tools?: AiccLlmTool[];
268
- response_format?: AiccLlmResponseFormat;
263
+ export interface HelperModelRequirement extends Omit<ModelRequirement, "decision"> {
269
264
  }
270
- export interface AiccLlmCompletionInput extends AiccGenerationParams {
271
- prompt: string;
272
- suffix?: string | null;
265
+ export interface RoutePolicy {
266
+ profile?: 'cheap' | 'fast' | 'balanced' | 'quality';
267
+ local_only?: boolean;
268
+ allow_fallback?: boolean;
269
+ runtime_failover?: boolean;
270
+ explain?: boolean;
271
+ allowed_provider_instances?: string[];
272
+ blocked_provider_instances?: string[];
273
+ max_cost?: Money;
274
+ max_latency_ms?: number;
273
275
  }
274
- export interface AiccRouteTraceAttempt {
275
- step: number;
276
- exact_model: string;
277
- started_at?: string;
278
- ended_at?: string | null;
279
- outcome: 'succeeded' | 'failed' | 'skipped';
280
- error_code?: string | null;
281
- fallback_reason?: string | null;
276
+ export interface ModelItem {
277
+ target: string;
278
+ weight?: number;
282
279
  }
283
- export interface AiccRouteTrace {
284
- attempts: AiccRouteTraceAttempt[];
285
- final_model?: string;
280
+ export interface ModelItemPatch {
281
+ target?: string;
282
+ weight?: number;
286
283
  }
287
- export interface AiccLlmExtra {
288
- provider_io?: unknown;
289
- route_trace?: AiccRouteTrace;
290
- [key: string]: unknown;
284
+ export type OverlayMergeMode = 'inherit' | 'replace';
285
+ export type AiccFallbackMode = 'strict' | 'parent' | 'target_exact' | 'target_logical' | 'disabled';
286
+ export interface AiccFallbackRule {
287
+ mode: AiccFallbackMode;
288
+ target?: string;
291
289
  }
292
- export type AiccLlmChatResponse = AiccTypedMethodResponse<AiccLlmExtra>;
293
- export type AiccLlmCompletionResponse = AiccTypedMethodResponse<AiccLlmExtra>;
294
- export type AiccEmbeddingTextItem = {
290
+ export type AiccSchedulerProfile = 'cost_first' | 'latency_first' | 'quality_first' | 'balanced' | 'local_first' | 'strict_local';
291
+ export type LockedValue<T> = T | {
292
+ value: T;
293
+ locked?: boolean;
294
+ };
295
+ export interface AiccSchedulerProfileWeights {
296
+ cost?: number;
297
+ latency?: number;
298
+ reliability?: number;
299
+ quality?: number;
300
+ preference?: number;
301
+ cache?: number;
302
+ local?: number;
303
+ }
304
+ export interface AiccSchedulerProfileConfig {
305
+ cost_first?: AiccSchedulerProfileWeights;
306
+ latency_first?: AiccSchedulerProfileWeights;
307
+ quality_first?: AiccSchedulerProfileWeights;
308
+ balanced?: AiccSchedulerProfileWeights;
309
+ local_first?: AiccSchedulerProfileWeights;
310
+ strict_local?: AiccSchedulerProfileWeights;
311
+ }
312
+ export interface AiccPolicyConfig {
313
+ profile?: LockedValue<AiccSchedulerProfile>;
314
+ scheduler_profiles?: LockedValue<AiccSchedulerProfileConfig>;
315
+ local_only?: LockedValue<boolean>;
316
+ allow_fallback?: LockedValue<boolean>;
317
+ allow_exact_model_fallback?: LockedValue<boolean>;
318
+ runtime_failover?: LockedValue<boolean>;
319
+ explain?: LockedValue<boolean>;
320
+ blocked_provider_instances?: LockedValue<string[]>;
321
+ allowed_provider_instances?: LockedValue<string[]>;
322
+ max_estimated_cost?: LockedValue<Money>;
323
+ }
324
+ export interface AiccLogicalNodeOverlay {
325
+ children?: Record<string, AiccLogicalNodeOverlay>;
326
+ source?: string;
327
+ items?: Record<string, ModelItem>;
328
+ item_overrides?: Record<string, ModelItemPatch>;
329
+ exact_model_weights?: Record<string, number>;
330
+ disable_line?: ModelDisable;
331
+ fallback?: AiccFallbackRule;
332
+ policy?: AiccPolicyConfig;
333
+ route_policy_override?: AiccPolicyConfig;
334
+ }
335
+ export interface AiccLogicalTreeOverlay {
336
+ path: string;
337
+ merge_mode?: OverlayMergeMode;
338
+ items?: Record<string, ModelItem>;
339
+ item_overrides?: Record<string, ModelItemPatch>;
340
+ exact_model_weights?: Record<string, number>;
341
+ disable_line?: ModelDisable;
342
+ fallback?: AiccFallbackRule;
343
+ route_policy_override?: AiccPolicyConfig;
344
+ source?: string;
345
+ }
346
+ export interface AiccSessionLogicalProfile {
347
+ name?: string;
348
+ overlays?: AiccLogicalTreeOverlay[];
349
+ route_policy_override?: AiccPolicyConfig;
350
+ }
351
+ export interface AiccRouteOverlay {
352
+ inherit?: string;
353
+ logical_tree?: Record<string, AiccLogicalNodeOverlay>;
354
+ logical_profile?: AiccSessionLogicalProfile;
355
+ logical_profiles?: Record<string, AiccSessionLogicalProfile>;
356
+ active_logical_profile?: string;
357
+ global_exact_model_weights?: Record<string, number>;
358
+ provider_weights?: Record<string, number>;
359
+ policy?: AiccPolicyConfig;
360
+ revision?: string;
361
+ ttl_seconds?: number;
362
+ }
363
+ export interface RouteResolveRequest {
364
+ trace_id?: string;
365
+ execution_mode?: AiccExecutionMode;
366
+ request_id?: string;
367
+ api_type: ApiType;
368
+ logical_model: string;
369
+ requirements?: ModelRequirement;
370
+ disable?: ModelDisable;
371
+ policy?: RoutePolicy;
372
+ estimated_input_tokens?: number;
373
+ estimated_output_tokens?: number;
374
+ session_overlay?: AiccRouteOverlay;
375
+ session_id?: string;
376
+ }
377
+ export interface RouteResolveResponse {
378
+ selected_exact_model: string;
379
+ selected_model_uid: string;
380
+ provider_instance_name: string;
381
+ provider_profile_id: string;
382
+ protocol_adapter_id: string;
383
+ model_driver_id: string;
384
+ provider_driver?: string;
385
+ origin_model_id: string;
386
+ provider_model_id: string;
387
+ operation: string;
388
+ enabled_capabilities?: Feature[];
389
+ disabled_capabilities?: Feature[];
390
+ fallback_attempts?: Array<{
391
+ exact_model: string;
392
+ provider_instance_name: string;
393
+ provider_model_id: string;
394
+ }>;
395
+ route_trace?: RouteTrace;
396
+ inventory_revision: string;
397
+ }
398
+ export interface InferenceRequest {
399
+ exact_model: string;
400
+ trace_id?: string;
401
+ execution_mode?: AiccExecutionMode;
402
+ idempotency_key?: string;
403
+ task_options?: AiTaskOptions;
404
+ session_id?: string;
405
+ }
406
+ export interface InferenceResponse {
407
+ task_id: string;
408
+ status: AiMethodStatus;
409
+ usage?: AiUsage;
410
+ cost?: AiCost;
411
+ finish_reason?: string;
412
+ provider_task_ref?: string;
413
+ route_trace?: RouteTrace;
414
+ event_ref?: string;
415
+ error?: AiccError;
416
+ }
417
+ interface ChatFields {
418
+ messages: AiMessage[];
419
+ tools?: AiToolSpec[];
420
+ response_format?: LlmResponseFormat;
421
+ temperature?: number;
422
+ top_p?: number;
423
+ max_output_tokens?: number;
424
+ seed?: number;
425
+ stop?: string[];
426
+ output?: AiOutputOptions;
427
+ }
428
+ interface ImageGenerationFields {
429
+ prompt: string;
430
+ negative_prompt?: string;
431
+ n?: number;
432
+ aspect_ratio?: string;
433
+ size?: string;
434
+ quality?: string;
435
+ style?: string;
436
+ seed?: number;
437
+ output?: AiOutputOptions;
438
+ }
439
+ export interface LlmChatInvokeRequest extends InferenceRequest, ChatFields {
440
+ }
441
+ export interface LlmChatHelperRequest extends ChatFields {
442
+ logical_model: string;
443
+ requirements?: HelperModelRequirement;
444
+ disable?: ModelDisable;
445
+ trace_id?: string;
446
+ execution_mode?: AiccExecutionMode;
447
+ policy?: RoutePolicy;
448
+ idempotency_key?: string;
449
+ task_options?: AiTaskOptions;
450
+ session_overlay?: AiccRouteOverlay;
451
+ session_id?: string;
452
+ }
453
+ export interface LlmChatInvokeResponse extends InferenceResponse {
454
+ message?: AiMessage;
455
+ tool_calls?: AiToolCall[];
456
+ }
457
+ export interface TextToImageInvokeRequest extends InferenceRequest, ImageGenerationFields {
458
+ }
459
+ export interface TextToImageHelperRequest extends ImageGenerationFields {
460
+ logical_model: string;
461
+ requirements?: HelperModelRequirement;
462
+ trace_id?: string;
463
+ execution_mode?: AiccExecutionMode;
464
+ disable?: ModelDisable;
465
+ policy?: RoutePolicy;
466
+ idempotency_key?: string;
467
+ task_options?: AiTaskOptions;
468
+ session_overlay?: AiccRouteOverlay;
469
+ session_id?: string;
470
+ }
471
+ export interface TextToImageInvokeResponse extends InferenceResponse {
472
+ images?: ResourceRef[];
473
+ provider_states?: AiContent[];
474
+ }
475
+ export type EmbeddingTextItem = {
295
476
  type: 'text';
296
477
  text: string;
297
478
  id?: string;
298
479
  } | {
299
480
  type: 'resource';
300
- resource: AiccResourceRef;
481
+ resource: ResourceRef;
301
482
  id?: string;
302
483
  };
303
- export interface AiccEmbeddingChunking {
304
- strategy: 'auto' | string;
305
- max_tokens?: number;
306
- overlap_tokens?: number;
307
- }
308
- export interface AiccEmbeddingTextInput {
309
- items: AiccEmbeddingTextItem[];
310
- chunking?: AiccEmbeddingChunking;
311
- embedding_space_id?: string | null;
312
- dimensions?: number;
313
- normalize?: boolean;
314
- prefer_artifact?: boolean | 'auto';
315
- }
316
- export interface AiccEmbeddingMultimodalItem {
317
- id?: string;
484
+ export interface EmbeddingMultimodalItem {
485
+ id: string;
318
486
  text?: string;
319
- image?: AiccResourceRef;
320
- audio?: AiccResourceRef;
321
- video?: AiccResourceRef;
487
+ image?: ResourceRef;
322
488
  }
323
- export interface AiccEmbeddingMultimodalInput {
324
- items: AiccEmbeddingMultimodalItem[];
325
- dimensions?: number;
326
- normalize?: boolean;
327
- embedding_space_id?: string | null;
328
- prefer_artifact?: boolean | 'auto';
489
+ export interface EmbeddingChunking {
490
+ strategy?: string;
491
+ max_tokens?: number;
492
+ overlap_tokens?: number;
329
493
  }
330
- export interface AiccEmbeddingVector {
494
+ export interface EmbeddingValue {
331
495
  index: number;
332
496
  id?: string;
333
497
  embedding: number[];
498
+ embedding_space_id: string;
499
+ }
500
+ export interface EmbeddingTextRequest extends InferenceRequest {
501
+ items: EmbeddingTextItem[];
502
+ chunking?: EmbeddingChunking;
334
503
  embedding_space_id?: string;
504
+ dimensions?: number;
505
+ normalize?: boolean;
506
+ prefer_artifact?: JsonValue;
335
507
  }
336
- export interface AiccEmbeddingResult {
337
- data?: AiccEmbeddingVector[];
338
- data_resource?: AiccResourceRef;
508
+ export interface EmbeddingMultimodalRequest extends InferenceRequest {
509
+ items: EmbeddingMultimodalItem[];
510
+ dimensions?: number;
511
+ normalize?: boolean;
339
512
  }
340
- export interface AiccEmbeddingExtra {
341
- embedding?: AiccEmbeddingResult;
342
- [key: string]: unknown;
513
+ export interface EmbeddingTextResponse extends InferenceResponse {
514
+ data?: EmbeddingValue[];
515
+ data_resource?: ResourceRef;
343
516
  }
344
- export type AiccEmbeddingTextResponse = AiccTypedMethodResponse<AiccEmbeddingExtra>;
345
- export type AiccEmbeddingMultimodalResponse = AiccTypedMethodResponse<AiccEmbeddingExtra>;
346
- export type AiccRerankDocument = {
347
- id?: string;
348
- text: string;
349
- metadata?: Record<string, unknown>;
517
+ export type EmbeddingMultimodalResponse = EmbeddingTextResponse;
518
+ export type DecisionText = string | JsonValue[] | {
519
+ [key: string]: JsonValue;
520
+ };
521
+ export type DecisionQuestionType = 'choice' | 'score' | 'boolean';
522
+ export interface DecisionOption {
523
+ id: string;
524
+ description: DecisionText | null;
525
+ }
526
+ export interface DecisionBooleanCriteria {
527
+ true?: DecisionText;
528
+ false?: DecisionText;
529
+ }
530
+ export type DecisionQuestion = {
531
+ type: 'choice';
532
+ id: string;
533
+ instructions: DecisionText;
534
+ options: DecisionOption[];
350
535
  } | {
351
- id?: string;
352
- resource: AiccResourceRef;
353
- metadata?: Record<string, unknown>;
536
+ type: 'score';
537
+ id: string;
538
+ instructions: DecisionText;
539
+ levels: DecisionText[];
540
+ } | {
541
+ type: 'boolean';
542
+ id: string;
543
+ instructions: DecisionText;
544
+ criteria?: DecisionBooleanCriteria;
354
545
  };
355
- export interface AiccRerankInput {
356
- query: string;
357
- documents: AiccRerankDocument[];
358
- n?: number;
359
- return_documents?: boolean;
546
+ export type DecisionAnswer = {
547
+ type: 'choice';
548
+ id: string;
549
+ selected: string;
550
+ probabilities: Record<string, number>;
551
+ confidence?: number;
552
+ } | {
553
+ type: 'score';
554
+ id: string;
555
+ score: number;
556
+ levels: DecisionText[];
557
+ probabilities: Record<string, number>;
558
+ confidence?: number;
559
+ } | {
560
+ type: 'boolean';
561
+ id: string;
562
+ probability_true: number;
563
+ confidence?: number;
564
+ };
565
+ export interface DecisionEvaluateRequest extends InferenceRequest {
566
+ state: DecisionText;
567
+ questions: DecisionQuestion[];
568
+ }
569
+ export interface DecisionEvaluateResponse extends InferenceResponse {
570
+ answers?: DecisionAnswer[];
571
+ model?: string;
572
+ }
573
+ export interface DecisionRequirements {
574
+ question_types?: DecisionQuestionType[];
575
+ structured_state?: boolean;
576
+ structured_rules?: boolean;
577
+ question_count?: number;
578
+ max_options?: number;
579
+ max_levels?: number;
580
+ input_bytes?: number;
581
+ max_state_question_bytes?: number;
582
+ }
583
+ export interface RerankDocument {
584
+ id: string;
585
+ text?: string;
586
+ resource?: ResourceRef;
587
+ metadata?: JsonValue;
360
588
  }
361
- export interface AiccRerankResultItem {
589
+ export interface RerankResult {
362
590
  index: number;
363
- id?: string;
591
+ id: string;
364
592
  score: number;
365
- document?: AiccRerankDocument;
593
+ document?: RerankDocument;
366
594
  }
367
- export interface AiccRerankResult {
368
- results: AiccRerankResultItem[];
369
- }
370
- export interface AiccRerankExtra {
371
- rerank?: AiccRerankResult;
372
- [key: string]: unknown;
595
+ export interface RerankRequest extends InferenceRequest {
596
+ query: string;
597
+ documents: RerankDocument[];
598
+ n?: number;
599
+ return_documents?: boolean;
373
600
  }
374
- export type AiccRerankResponse = AiccTypedMethodResponse<AiccRerankExtra>;
375
- export interface AiccImageOutputOptions {
376
- media_type?: string;
377
- size?: string;
601
+ export interface RerankResponse extends InferenceResponse {
602
+ results?: RerankResult[];
378
603
  }
379
- export interface AiccImageTxt2imgInput {
604
+ export interface ImageToImageRequest extends InferenceRequest {
605
+ images: ResourceRef[];
380
606
  prompt: string;
381
- negative_prompt?: string;
382
- n?: number;
383
- aspect_ratio?: string;
384
- quality?: 'low' | 'medium' | 'high' | string;
385
- seed?: number;
386
- output?: AiccImageOutputOptions;
387
- }
388
- export interface AiccImageImg2imgInput {
389
- images: AiccResourceRef[];
390
- prompt?: string;
391
607
  strength?: number;
392
- output?: AiccImageOutputOptions;
608
+ output?: AiOutputOptions;
393
609
  }
394
- export type AiccImageMaskSemantics = 'white_area_is_edit_area' | 'black_area_is_edit_area' | 'alpha_zero_is_edit_area';
395
- export interface AiccImageInpaintInput {
396
- image: AiccResourceRef;
397
- mask: AiccResourceRef;
610
+ export interface ImageInpaintRequest extends InferenceRequest {
611
+ image: ResourceRef;
612
+ mask: ResourceRef;
398
613
  prompt: string;
399
- mask_semantics?: AiccImageMaskSemantics;
400
- output?: AiccImageOutputOptions;
614
+ mask_semantics?: 'white_area_is_edit_area' | 'black_area_is_edit_area' | 'alpha_zero_is_edit_area';
615
+ output?: AiOutputOptions;
401
616
  }
402
- export interface AiccImageUpscaleInput {
403
- image: AiccResourceRef;
617
+ export interface ImageUpscaleRequest extends InferenceRequest {
618
+ image: ResourceRef;
404
619
  scale?: number;
405
620
  target_width?: number;
406
621
  target_height?: number;
407
622
  preserve_faces?: boolean;
408
- output?: AiccImageOutputOptions;
623
+ output?: AiOutputOptions;
624
+ }
625
+ export interface ImageBackgroundRemoveRequest extends InferenceRequest {
626
+ image: ResourceRef;
627
+ mode?: string;
628
+ output?: AiOutputOptions;
409
629
  }
410
- export interface AiccImageBgRemoveInput {
411
- image: AiccResourceRef;
412
- mode?: 'rgba_image' | 'mask' | string;
413
- output?: AiccImageOutputOptions;
630
+ export interface ImageToImageResponse extends InferenceResponse {
631
+ images?: ResourceRef[];
632
+ provider_states?: AiContent[];
414
633
  }
415
- export interface AiccImageExtra {
416
- images?: AiccResourceRef[];
417
- image?: AiccResourceRef;
418
- [key: string]: unknown;
634
+ export type ImageInpaintResponse = ImageToImageResponse;
635
+ export interface ImageUpscaleResponse extends InferenceResponse {
636
+ image?: ResourceRef;
419
637
  }
420
- export type AiccImageResponse = AiccTypedMethodResponse<AiccImageExtra>;
421
- export interface AiccBoundingBox {
638
+ export type ImageBackgroundRemoveResponse = ImageUpscaleResponse;
639
+ export interface BoundingBox {
422
640
  format: 'xywh';
423
641
  unit: 'px' | 'relative';
424
642
  x: number;
@@ -426,43 +644,67 @@ export interface AiccBoundingBox {
426
644
  width: number;
427
645
  height: number;
428
646
  }
429
- export interface AiccBoundingBoxSpec {
430
- format: 'xywh';
431
- unit: 'px' | 'relative';
647
+ export interface OcrLine {
648
+ text: string;
649
+ confidence?: number;
432
650
  }
433
- export type AiccMask = {
434
- format: 'rle';
435
- size: [number, number];
436
- counts: string;
437
- } | {
438
- format: 'polygon';
439
- points: number[][];
440
- } | {
441
- format: 'bitmap_resource';
442
- resource: AiccResourceRef;
443
- };
444
- export interface AiccVisionOcrInput {
445
- document: AiccResourceRef;
446
- level?: 'page' | 'block' | 'line' | 'word' | string;
651
+ export interface OcrBlock {
652
+ type: string;
653
+ bbox: BoundingBox;
654
+ lines?: OcrLine[];
655
+ }
656
+ export interface OcrPage {
657
+ page_index: number;
658
+ width: number;
659
+ height: number;
660
+ blocks?: OcrBlock[];
661
+ }
662
+ export interface VisionOcrRequest extends InferenceRequest {
663
+ document: ResourceRef;
664
+ level?: string;
447
665
  language_hints?: string[];
448
666
  return_layout?: boolean;
449
667
  return_artifacts?: string[];
450
668
  }
451
- export interface AiccVisionCaptionInput {
452
- image: AiccResourceRef;
453
- style?: 'short' | 'detailed' | string;
669
+ export interface VisionOcrResponse extends InferenceResponse {
670
+ text?: string;
671
+ pages?: OcrPage[];
672
+ artifacts?: Record<string, ResourceRef>;
673
+ }
674
+ export interface Caption {
675
+ text: string;
676
+ confidence?: number;
677
+ }
678
+ export interface VisionCaptionRequest extends InferenceRequest {
679
+ image: ResourceRef;
680
+ style?: string;
454
681
  language?: string;
455
682
  n?: number;
456
683
  }
457
- export interface AiccVisionDetectInput {
458
- image: AiccResourceRef;
684
+ export interface VisionCaptionResponse extends InferenceResponse {
685
+ captions?: Caption[];
686
+ }
687
+ export interface Detection {
688
+ label: string;
689
+ class_id?: string;
690
+ score: number;
691
+ bbox: BoundingBox;
692
+ }
693
+ export interface VisionDetectRequest extends InferenceRequest {
694
+ image: ResourceRef;
459
695
  classes?: string[];
460
696
  score_threshold?: number;
461
- bbox_spec?: AiccBoundingBoxSpec;
697
+ bbox_spec?: {
698
+ format: 'xywh';
699
+ unit: 'px' | 'relative';
700
+ };
462
701
  }
463
- export type AiccVisionSegmentPrompt = {
702
+ export interface VisionDetectResponse extends InferenceResponse {
703
+ detections?: Detection[];
704
+ }
705
+ export type SegmentationPrompt = {
464
706
  type: 'box';
465
- bbox: AiccBoundingBox;
707
+ bbox: BoundingBox;
466
708
  } | {
467
709
  type: 'point';
468
710
  x: number;
@@ -472,170 +714,158 @@ export type AiccVisionSegmentPrompt = {
472
714
  type: 'text';
473
715
  text: string;
474
716
  };
475
- export interface AiccVisionSegmentInput {
476
- image: AiccResourceRef;
477
- prompt: AiccVisionSegmentPrompt;
478
- mask_format?: 'rle' | 'polygon' | 'bitmap_resource';
479
- return_bitmap_mask?: boolean;
480
- }
481
- export interface AiccVisionOcrExtra {
482
- ocr?: unknown;
483
- [key: string]: unknown;
484
- }
485
- export interface AiccVisionCaption {
486
- text: string;
487
- confidence?: number;
488
- }
489
- export interface AiccVisionCaptionExtra {
490
- captions?: AiccVisionCaption[];
491
- [key: string]: unknown;
492
- }
493
- export interface AiccVisionDetection {
494
- label: string;
495
- class_id?: string;
717
+ export type AiMask = {
718
+ format: 'rle';
719
+ size: [number, number];
720
+ counts: string;
721
+ } | {
722
+ format: 'polygon';
723
+ points: [number, number][];
724
+ } | {
725
+ format: 'bitmap_resource';
726
+ resource: ResourceRef;
727
+ };
728
+ export interface SegmentationMask {
729
+ id: string;
496
730
  score: number;
497
- bbox: AiccBoundingBox;
498
- }
499
- export interface AiccVisionDetectExtra {
500
- detections?: AiccVisionDetection[];
501
- [key: string]: unknown;
731
+ bbox?: BoundingBox;
732
+ mask: AiMask;
502
733
  }
503
- export interface AiccVisionMaskResult {
504
- id?: string;
505
- score?: number;
506
- bbox?: AiccBoundingBox;
507
- mask: AiccMask;
508
- }
509
- export interface AiccVisionSegmentExtra {
510
- segment?: {
511
- masks: AiccVisionMaskResult[];
512
- };
513
- [key: string]: unknown;
734
+ export interface VisionSegmentRequest extends InferenceRequest {
735
+ image: ResourceRef;
736
+ prompt: SegmentationPrompt;
737
+ mask_format?: string;
738
+ return_bitmap_mask?: boolean;
514
739
  }
515
- export type AiccVisionOcrResponse = AiccTypedMethodResponse<AiccVisionOcrExtra>;
516
- export type AiccVisionCaptionResponse = AiccTypedMethodResponse<AiccVisionCaptionExtra>;
517
- export type AiccVisionDetectResponse = AiccTypedMethodResponse<AiccVisionDetectExtra>;
518
- export type AiccVisionSegmentResponse = AiccTypedMethodResponse<AiccVisionSegmentExtra>;
519
- export interface AiccAudioOutputOptions {
520
- media_type?: string;
521
- sample_rate?: number;
740
+ export interface VisionSegmentResponse extends InferenceResponse {
741
+ masks?: SegmentationMask[];
522
742
  }
523
- export interface AiccAudioVoiceSpec {
743
+ export interface VoiceSpec {
524
744
  voice_id?: string;
525
745
  language?: string;
526
- gender?: 'male' | 'female' | 'neutral' | string;
746
+ gender?: string;
527
747
  style?: string;
528
748
  speaker_similarity_required?: boolean;
529
749
  }
530
- export interface AiccAudioTtsInput {
750
+ export interface AudioTextToSpeechRequest extends InferenceRequest {
531
751
  text: string;
532
- voice?: AiccAudioVoiceSpec;
752
+ voice: VoiceSpec;
533
753
  speed?: number;
534
- output?: AiccAudioOutputOptions;
754
+ output?: AiOutputOptions;
755
+ }
756
+ export interface AudioTextToSpeechResponse extends InferenceResponse {
757
+ audio?: ResourceRef;
758
+ }
759
+ export interface AsrSegment {
760
+ id: string;
761
+ start_seconds: number;
762
+ end_seconds: number;
763
+ text: string;
764
+ speaker?: string;
765
+ confidence?: number;
535
766
  }
536
- export interface AiccAudioAsrInput {
537
- audio: AiccResourceRef;
767
+ export interface AudioSpeechRecognitionRequest extends InferenceRequest {
768
+ audio: ResourceRef;
538
769
  language?: string;
539
- timestamps?: 'none' | 'word' | 'segment' | string;
770
+ timestamps?: string;
540
771
  diarization?: boolean;
541
- output_formats?: Array<'json' | 'vtt' | 'srt' | string>;
772
+ output_formats?: string[];
773
+ }
774
+ export interface AudioSpeechRecognitionResponse extends InferenceResponse {
775
+ text?: string;
776
+ segments?: AsrSegment[];
777
+ artifacts?: Record<string, ResourceRef>;
778
+ diagnostic?: JsonValue;
779
+ }
780
+ export interface MusicSection {
781
+ name: string;
782
+ start_seconds: number;
783
+ end_seconds: number;
784
+ }
785
+ export interface MusicStructure {
786
+ lyrics?: string;
787
+ sections?: MusicSection[];
542
788
  }
543
- export interface AiccAudioMusicInput {
789
+ export interface AudioMusicRequest extends InferenceRequest {
544
790
  prompt: string;
545
791
  duration_seconds?: number;
546
792
  instrumental?: boolean;
547
- lyrics?: string | null;
793
+ lyrics?: string;
548
794
  seed?: number;
549
- output?: AiccAudioOutputOptions;
795
+ output?: AiOutputOptions;
550
796
  }
551
- export interface AiccAudioEnhanceInput {
552
- audio: AiccResourceRef;
553
- task: 'denoise' | 'dereverb' | 'separate_stems' | string;
797
+ export interface AudioMusicResponse extends InferenceResponse {
798
+ audio?: ResourceRef;
799
+ structure?: MusicStructure;
800
+ }
801
+ export interface AudioEnhanceRequest extends InferenceRequest {
802
+ audio: ResourceRef;
803
+ task: string;
554
804
  strength?: number;
555
805
  return_stems?: boolean;
556
806
  }
557
- export interface AiccAudioSegment {
558
- id?: string;
559
- start_seconds: number;
560
- end_seconds: number;
561
- text: string;
562
- speaker?: string;
563
- confidence?: number;
564
- }
565
- export interface AiccAudioExtra {
566
- asr?: {
567
- segments?: AiccAudioSegment[];
568
- };
569
- audio?: AiccResourceRef;
570
- stems?: AiccResourceRef[];
571
- structure?: unknown;
572
- [key: string]: unknown;
573
- }
574
- export type AiccAudioResponse = AiccTypedMethodResponse<AiccAudioExtra>;
575
- export interface AiccVideoOutputOptions {
576
- media_type?: string;
577
- fps?: number;
807
+ export interface AudioEnhanceResponse extends InferenceResponse {
808
+ audio?: ResourceRef;
809
+ stems?: ResourceRef[];
578
810
  }
579
- export interface AiccVideoTxt2videoInput {
811
+ export interface VideoTextToVideoRequest extends InferenceRequest {
580
812
  prompt: string;
581
813
  duration_seconds?: number;
582
814
  aspect_ratio?: string;
583
815
  resolution?: string;
584
816
  generate_audio?: boolean;
585
817
  seed?: number;
586
- output?: AiccVideoOutputOptions;
818
+ output?: AiOutputOptions;
587
819
  }
588
- export interface AiccVideoImg2videoInput {
589
- image: AiccResourceRef;
590
- prompt?: string;
820
+ export interface VideoImageToVideoRequest extends InferenceRequest {
821
+ image: ResourceRef;
822
+ prompt: string;
591
823
  duration_seconds?: number;
592
824
  aspect_ratio?: string;
593
825
  resolution?: string;
594
826
  }
595
- export interface AiccTimeRange {
827
+ export interface TimeRange {
596
828
  start_seconds: number;
597
829
  end_seconds: number;
598
830
  }
599
- export interface AiccVideoVideo2videoInput {
600
- video: AiccResourceRef;
601
- prompt?: string;
831
+ export interface VideoToVideoRequest extends InferenceRequest {
832
+ video: ResourceRef;
833
+ prompt: string;
602
834
  preserve_motion?: boolean;
603
- time_range?: AiccTimeRange;
835
+ time_range?: TimeRange;
604
836
  }
605
- export interface AiccVideoExtendInput {
606
- video: AiccResourceRef;
607
- prompt?: string;
837
+ export interface VideoExtendRequest extends InferenceRequest {
838
+ video: ResourceRef;
839
+ prompt: string;
608
840
  continuation_handle?: string;
609
841
  duration_seconds?: number;
610
842
  resolution?: string;
611
843
  }
612
- export interface AiccVideoUpscaleInput {
613
- video: AiccResourceRef;
614
- target_resolution?: string;
844
+ export interface VideoUpscaleRequest extends InferenceRequest {
845
+ video: ResourceRef;
846
+ target_resolution: string;
615
847
  denoise?: boolean;
616
848
  sharpen?: number;
617
- output?: AiccVideoOutputOptions;
618
- }
619
- export interface AiccVideoExtra {
620
- video?: AiccResourceRef;
621
- [key: string]: unknown;
622
- }
623
- export type AiccVideoResponse = AiccTypedMethodResponse<AiccVideoExtra>;
624
- export type AiccAgentComputerActionName = 'screenshot' | 'left_click' | 'right_click' | 'type' | 'key' | 'scroll' | 'wait';
625
- export interface AiccAgentComputerUseInput {
626
- task: string;
627
- environment: {
628
- environment_id: string;
629
- session_id: string;
630
- screenshot?: AiccResourceRef;
631
- viewport?: {
632
- width: number;
633
- height: number;
634
- };
849
+ output?: AiOutputOptions;
850
+ }
851
+ export interface VideoResponse extends InferenceResponse {
852
+ video?: ResourceRef;
853
+ }
854
+ export type VideoTextToVideoResponse = VideoResponse;
855
+ export type VideoImageToVideoResponse = VideoResponse;
856
+ export type VideoToVideoResponse = VideoResponse;
857
+ export type VideoExtendResponse = VideoResponse;
858
+ export type VideoUpscaleResponse = VideoResponse;
859
+ export interface ComputerEnvironment {
860
+ environment_id: string;
861
+ session_id: string;
862
+ screenshot: ResourceRef;
863
+ viewport: {
864
+ width: number;
865
+ height: number;
635
866
  };
636
- allowed_actions?: AiccAgentComputerActionName[];
637
867
  }
638
- export type AiccAgentComputerAction = {
868
+ export type ComputerAction = {
639
869
  type: 'screenshot';
640
870
  } | {
641
871
  type: 'left_click' | 'right_click';
@@ -649,66 +879,447 @@ export type AiccAgentComputerAction = {
649
879
  key: string;
650
880
  } | {
651
881
  type: 'scroll';
652
- x?: number;
653
- y?: number;
654
- delta_x?: number;
655
- delta_y?: number;
882
+ delta_x: number;
883
+ delta_y: number;
656
884
  } | {
657
885
  type: 'wait';
658
- milliseconds?: number;
886
+ duration_ms: number;
659
887
  };
660
- export interface AiccAgentComputerUseExtra {
661
- actions?: AiccAgentComputerAction[];
888
+ export interface ComputerUseRequest extends InferenceRequest {
889
+ task: string;
890
+ environment: ComputerEnvironment;
891
+ allowed_actions: string[];
892
+ }
893
+ export interface ComputerUseResponse extends InferenceResponse {
894
+ actions?: ComputerAction[];
662
895
  requires_next_observation?: boolean;
663
- [key: string]: unknown;
664
896
  }
665
- export type AiccAgentComputerUseResponse = AiccTypedMethodResponse<AiccAgentComputerUseExtra>;
897
+ export type EmptyRequest = Record<string, never>;
898
+ export type ServiceReloadSettingsRequest = EmptyRequest;
899
+ export type RoutingGetRequest = EmptyRequest;
900
+ export type ListModelsRequest = EmptyRequest;
901
+ export type ProviderCatalogRequest = EmptyRequest;
902
+ export type ProtocolAdapterListRequest = EmptyRequest;
903
+ export type DriverMetadataUpdateGetReq = EmptyRequest;
904
+ export interface CancelRequest {
905
+ task_id: string;
906
+ }
907
+ export interface ServiceReloadSettingsResponse {
908
+ ok: boolean;
909
+ settings_revision: number;
910
+ }
911
+ export interface QuotaQueryRequest {
912
+ capability?: Capability;
913
+ method?: string;
914
+ }
915
+ export interface QuotaView {
916
+ state: 'normal' | 'near_limit' | 'exhausted';
917
+ remaining_request_units?: number;
918
+ remaining_cost?: Money;
919
+ reset_at?: string;
920
+ }
921
+ export interface QuotaQueryResponse {
922
+ quota: QuotaView;
923
+ }
924
+ export interface ProviderCatalogEntry {
925
+ provider_profile_id: string;
926
+ display_name: string;
927
+ base_url: string;
928
+ protocol_adapter_id: string;
929
+ provider_rules_id?: string;
930
+ ui_hints?: Record<string, JsonValue>;
931
+ }
932
+ export interface ProviderCatalogResponse {
933
+ catalog_revision: number;
934
+ providers: ProviderCatalogEntry[];
935
+ }
936
+ export type ProtocolAdapterStatus = 'stable' | 'preview' | 'deprecated';
937
+ export type ProtocolExecutionMode = 'immediate' | 'stream' | 'native_task';
938
+ export interface ProtocolAdapterOperation {
939
+ operation_id: string;
940
+ api_types: ApiType[];
941
+ capabilities: Capability[];
942
+ supported_features: string[];
943
+ execution_modes: ProtocolExecutionMode[];
944
+ supports_cancel: boolean;
945
+ supports_webhook: boolean;
946
+ }
947
+ export interface ProtocolAdapterView {
948
+ protocol_family_id: string;
949
+ protocol_adapter_id: string;
950
+ interface_generation: string;
951
+ status: ProtocolAdapterStatus;
952
+ probe_priority: number;
953
+ base_adapter_id?: string;
954
+ operations: ProtocolAdapterOperation[];
955
+ }
956
+ export interface ProtocolAdapterListResponse {
957
+ adapters: ProtocolAdapterView[];
958
+ }
959
+ interface ProviderConfig {
960
+ provider_type: string;
961
+ provider_profile_id: string;
962
+ protocol_family_id?: string;
963
+ protocol_adapter_id?: string;
964
+ base_url: string;
965
+ credentials: JsonValue;
966
+ region?: string;
967
+ workspace?: string;
968
+ account?: string;
969
+ provider_rules_id?: string;
970
+ auth?: JsonValue;
971
+ discovery?: JsonValue;
972
+ instance_rules?: JsonValue;
973
+ timeout_ms?: number;
974
+ auto_sync_models?: boolean;
975
+ }
976
+ export interface ProviderValidateRequest extends ProviderConfig {
977
+ provider_instance_name?: string;
978
+ }
979
+ export type ProviderValidationErrorKind = 'configuration' | 'base_url' | 'authentication' | 'protocol' | 'models' | 'balance';
980
+ export interface ProviderValidationErrorDetail {
981
+ kind: ProviderValidationErrorKind;
982
+ message: string;
983
+ }
984
+ export interface ProviderValidateResponse {
985
+ base_url_reachable: boolean;
986
+ auth_valid: boolean;
987
+ models_discovered: string[];
988
+ balance_available: boolean;
989
+ errors: string[];
990
+ error_details: ProviderValidationErrorDetail[];
991
+ resolved_protocol_adapter_id?: string;
992
+ }
993
+ export interface ProviderAddRequest extends ProviderConfig {
994
+ provider_instance_name: string;
995
+ }
996
+ export interface ProviderReloadResult {
997
+ ok: boolean;
998
+ providers_registered: number;
999
+ }
1000
+ export interface ProviderAddResponse {
1001
+ ok: boolean;
1002
+ provider_instance_name: string;
1003
+ settings_revision: number;
1004
+ reload: ProviderReloadResult;
1005
+ }
1006
+ export interface ProviderDeleteRequest {
1007
+ provider_instance_name: string;
1008
+ }
1009
+ export interface ProviderDeleteResponse {
1010
+ ok: boolean;
1011
+ provider_instance_name?: string;
1012
+ settings_revision?: number;
1013
+ reload?: ProviderReloadResult;
1014
+ reason?: string;
1015
+ }
1016
+ export interface ProviderRefreshModelsRequest {
1017
+ provider_instance_name: string;
1018
+ }
1019
+ export interface ProviderRefreshModelsResponse {
1020
+ ok: boolean;
1021
+ provider_instance_name: string;
1022
+ inventory_revision: string;
1023
+ }
1024
+ export interface ProviderListRequest {
1025
+ method?: string;
1026
+ }
1027
+ export type ProviderInstanceAuthMode = 'api_key' | 'dynamic_login';
1028
+ export interface ProviderInstanceAuthView {
1029
+ mode?: ProviderInstanceAuthMode;
1030
+ credential_kind?: string;
1031
+ configured: boolean;
1032
+ }
1033
+ export type ProviderInstanceInventoryState = 'disabled' | 'not_loaded' | 'loaded';
1034
+ export interface ProviderInstanceInventoryView {
1035
+ state: ProviderInstanceInventoryState;
1036
+ revision?: string;
1037
+ model_count: number;
1038
+ updated_at_ms?: number;
1039
+ }
1040
+ export type ProviderInstanceHealthState = 'disabled' | 'not_loaded' | 'unknown' | 'healthy' | 'degraded' | 'unavailable';
1041
+ export interface ProviderInstanceHealthView {
1042
+ state: ProviderInstanceHealthState;
1043
+ checked_at_ms?: number;
1044
+ }
1045
+ export interface ProviderInstanceView {
1046
+ provider_instance_name: string;
1047
+ provider_type: string;
1048
+ provider_profile_id: string;
1049
+ protocol_adapter_id: string;
1050
+ base_url: string;
1051
+ enabled: boolean;
1052
+ auth: ProviderInstanceAuthView;
1053
+ inventory: ProviderInstanceInventoryView;
1054
+ health: ProviderInstanceHealthView;
1055
+ }
1056
+ export interface ProviderListResponse {
1057
+ providers: ProviderInstanceView[];
1058
+ settings_revision: number;
1059
+ inventory_revision: string;
1060
+ }
1061
+ export interface ProviderHealthRequest {
1062
+ exact_model: string;
1063
+ }
1064
+ export interface ProviderHealthResponse {
1065
+ health: JsonValue;
1066
+ }
1067
+ export interface ProviderUpdateRequest {
1068
+ provider_instance_name: string;
1069
+ settings_revision: number;
1070
+ enabled?: boolean;
1071
+ base_url?: string;
1072
+ credential?: JsonValue;
1073
+ provider_profile_id?: string;
1074
+ protocol_adapter_id?: string;
1075
+ discovery?: JsonValue;
1076
+ instance_rules?: JsonValue;
1077
+ }
1078
+ export interface ProviderUpdateResponse {
1079
+ ok: boolean;
1080
+ settings_revision: number;
1081
+ provider?: JsonValue;
1082
+ }
1083
+ export interface CancelResponse {
1084
+ task_id: string;
1085
+ accepted: boolean;
1086
+ }
1087
+ export type UsageQueryTimeRange = {
1088
+ kind: 'last1d' | 'last7d' | 'last30d';
1089
+ } | {
1090
+ kind: 'explicit';
1091
+ start_time_ms: number;
1092
+ end_time_ms: number;
1093
+ };
1094
+ export interface UsageQueryFilters {
1095
+ tenant_ids?: string[];
1096
+ user_ids?: string[];
1097
+ caller_app_ids?: string[];
1098
+ caller_app_query?: string;
1099
+ request_models?: string[];
1100
+ provider_models?: string[];
1101
+ provider_model_query?: string;
1102
+ provider_instance_names?: string[];
1103
+ provider_instance_query?: string;
1104
+ capabilities?: string[];
1105
+ task_ids?: string[];
1106
+ idempotency_keys?: string[];
1107
+ methods?: string[];
1108
+ }
1109
+ export type UsageQueryGroup = 'provider_model' | 'provider_instance_name' | 'request_model' | 'method' | 'capability' | 'caller_app_id' | 'user_id' | 'tenant_id';
1110
+ export interface QueryUsageRequest {
1111
+ time_range: UsageQueryTimeRange;
1112
+ filters?: UsageQueryFilters;
1113
+ group_by?: UsageQueryGroup[];
1114
+ time_bucket?: 'hour' | 'day';
1115
+ output_mode?: 'summary' | 'events' | 'summary_and_events';
1116
+ limit?: number;
1117
+ cursor?: string;
1118
+ }
1119
+ export interface UsageAggregate {
1120
+ total_requests: number;
1121
+ input_tokens: number;
1122
+ output_tokens: number;
1123
+ total_tokens: number;
1124
+ consumed_request_units: number;
1125
+ finance_totals: Money[];
1126
+ finance_complete: boolean;
1127
+ }
1128
+ export interface AiccUsageEvent {
1129
+ event_id: string;
1130
+ tenant_id: string;
1131
+ user_id: string;
1132
+ caller_app_id?: string;
1133
+ task_id: string;
1134
+ trace_id?: string;
1135
+ idempotency_key?: string;
1136
+ method: AiccAiMethod;
1137
+ capability: string;
1138
+ request_model: string;
1139
+ provider_instance_name: string;
1140
+ provider_model: string;
1141
+ input_tokens?: number;
1142
+ output_tokens?: number;
1143
+ total_tokens?: number;
1144
+ request_units?: number;
1145
+ usage_json: AiUsage;
1146
+ finance_snapshot_json?: JsonValue;
1147
+ created_at_ms: number;
1148
+ }
1149
+ export interface UsageGroupedRow {
1150
+ group: Record<string, string>;
1151
+ aggregate: UsageAggregate;
1152
+ }
1153
+ export interface UsageBucketedRow {
1154
+ bucket_start_ms: number;
1155
+ group?: Record<string, string>;
1156
+ aggregate: UsageAggregate;
1157
+ }
1158
+ export interface QueryUsageResponse {
1159
+ total: UsageAggregate;
1160
+ grouped?: UsageGroupedRow[];
1161
+ buckets?: UsageBucketedRow[];
1162
+ events?: AiccUsageEvent[];
1163
+ next_cursor?: string;
1164
+ }
1165
+ export interface AiccRouteTraceEvent {
1166
+ trace_id: string;
1167
+ tenant_id: string;
1168
+ caller_app_id?: string;
1169
+ task_id: string;
1170
+ request_model: string;
1171
+ selected_exact_model?: string;
1172
+ provider_instance_name?: string;
1173
+ api_type: string;
1174
+ route_trace_json: RouteTrace;
1175
+ created_at_ms: number;
1176
+ }
1177
+ export interface QueryRouteTraceRequest {
1178
+ limit?: number;
1179
+ cursor?: string;
1180
+ start_time_ms?: number;
1181
+ end_time_ms?: number;
1182
+ task_ids?: string[];
1183
+ request_ids?: string[];
1184
+ api_types?: string[];
1185
+ provider_instance_names?: string[];
1186
+ selected_exact_models?: string[];
1187
+ scheduler_profiles?: string[];
1188
+ query?: string;
1189
+ outcome?: string;
1190
+ }
1191
+ export interface QueryRouteTraceResponse {
1192
+ traces?: JsonValue[];
1193
+ next_cursor?: string;
1194
+ total_count?: number;
1195
+ }
1196
+ export interface RoutingPreviewRequest {
1197
+ paths?: string[];
1198
+ explain?: boolean;
1199
+ requirements?: ModelRequirement;
1200
+ }
1201
+ export interface RoutingPreviewEntry {
1202
+ path: string;
1203
+ api_type: ApiType;
1204
+ kind: 'task' | 'spec' | 'family' | 'directory';
1205
+ available: boolean;
1206
+ selected_exact_model?: string;
1207
+ error?: string;
1208
+ trace?: JsonValue;
1209
+ }
1210
+ export interface RoutingPreviewResponse {
1211
+ settings_revision: number;
1212
+ entries: RoutingPreviewEntry[];
1213
+ }
1214
+ export interface RoutingGetResponse {
1215
+ settings_revision: number;
1216
+ routing: AiccRouteOverlay;
1217
+ }
1218
+ export interface RoutingUpdateRequest {
1219
+ settings_revision: number;
1220
+ provider_weights: Record<string, number>;
1221
+ }
1222
+ export interface RoutingUpdateResponse {
1223
+ ok: boolean;
1224
+ settings_revision: number;
1225
+ routing: AiccRouteOverlay;
1226
+ }
1227
+ export interface DriverMetadataUpdateSetReq {
1228
+ enabled: boolean;
1229
+ source_url?: string;
1230
+ interval_secs?: number;
1231
+ }
1232
+ export type DriverMetadataUpdateStatus = 'disabled' | 'idle' | 'updating' | 'healthy' | 'degraded' | 'error';
1233
+ export interface DriverMetadataProviderStatus {
1234
+ provider_instance_name: string;
1235
+ metadata_applied_seq: number;
1236
+ }
1237
+ export interface DriverMetadataUpdateView {
1238
+ enabled: boolean;
1239
+ source_url?: string | null;
1240
+ source_configured: boolean;
1241
+ interval_secs: number;
1242
+ metadata_target_seq: number;
1243
+ providers: DriverMetadataProviderStatus[];
1244
+ status: DriverMetadataUpdateStatus;
1245
+ active_revision?: number | null;
1246
+ last_attempt_at_ms?: number | null;
1247
+ last_success_at_ms?: number | null;
1248
+ last_error?: string | null;
1249
+ consecutive_failures: number;
1250
+ }
1251
+ export interface DriverMetadataRuntimeApply {
1252
+ ok: boolean;
1253
+ refresh_scheduled?: boolean;
1254
+ error?: string;
1255
+ }
1256
+ export interface DriverMetadataUpdateSetResponse {
1257
+ ok: boolean;
1258
+ settings_revision: number;
1259
+ settings: DriverMetadataUpdateView;
1260
+ runtime_apply: DriverMetadataRuntimeApply;
1261
+ }
666
1262
  export declare function isAiccAiMethod(method: string): method is AiccAiMethod;
667
- export declare function aiccTextMessage(role: AiccAiRole, text: string): AiccMessage;
668
- export declare function aiccMessageTextContent(message: AiccMessage): string;
669
- export declare function aiccMessageFirstText(message: AiccMessage): string | undefined;
670
- export declare function aiccResponseTextContent(response: AiccResponse): string;
671
- export declare function aiccResponseToolCalls(response: AiccResponse): AiccToolCall[];
672
- export declare function aiccResponseArtifacts(response: AiccResponse): AiccArtifact[];
673
- export declare function aiccRenderMessageForDebug(message: AiccMessage): string;
674
- export declare function aiccEstimateMessageTextLen(message: AiccMessage): number;
675
- export declare function validateAiccMessage(message: AiccMessage): void;
676
- export declare function validateAiccMessages(messages: AiccMessage[]): void;
677
- export declare function validateAiccResponse(response: AiccResponse): void;
1263
+ export declare function aiccTextMessage(role: AiRole, text: string): AiMessage;
1264
+ export declare function aiccMessageTextContent(message: AiMessage): string;
1265
+ export declare function aiccMessageFirstText(message: AiMessage): string | undefined;
1266
+ export declare function validateAiccMessage(message: AiMessage): void;
678
1267
  export declare class AiccClient {
679
1268
  private rpcClient;
680
1269
  constructor(rpcClient: kRPCClient);
681
1270
  setSeq(seq: number): void;
682
- callMethod(method: AiccAiMethod, request: AiccMethodRequest): Promise<AiccMethodResponse>;
683
- llmChat(request: AiccTypedMethodCall<AiccLlmChatInput>): Promise<AiccLlmChatResponse>;
684
- llmCompletion(request: AiccTypedMethodCall<AiccLlmCompletionInput>): Promise<AiccLlmCompletionResponse>;
685
- embeddingText(request: AiccTypedMethodCall<AiccEmbeddingTextInput>): Promise<AiccEmbeddingTextResponse>;
686
- embeddingMultimodal(request: AiccTypedMethodCall<AiccEmbeddingMultimodalInput>): Promise<AiccEmbeddingMultimodalResponse>;
687
- rerank(request: AiccTypedMethodCall<AiccRerankInput>): Promise<AiccRerankResponse>;
688
- imageTxt2img(request: AiccTypedMethodCall<AiccImageTxt2imgInput>): Promise<AiccImageResponse>;
689
- imageImg2img(request: AiccTypedMethodCall<AiccImageImg2imgInput>): Promise<AiccImageResponse>;
690
- imageInpaint(request: AiccTypedMethodCall<AiccImageInpaintInput>): Promise<AiccImageResponse>;
691
- imageUpscale(request: AiccTypedMethodCall<AiccImageUpscaleInput>): Promise<AiccImageResponse>;
692
- imageBgRemove(request: AiccTypedMethodCall<AiccImageBgRemoveInput>): Promise<AiccImageResponse>;
693
- visionOcr(request: AiccTypedMethodCall<AiccVisionOcrInput>): Promise<AiccVisionOcrResponse>;
694
- visionCaption(request: AiccTypedMethodCall<AiccVisionCaptionInput>): Promise<AiccVisionCaptionResponse>;
695
- visionDetect(request: AiccTypedMethodCall<AiccVisionDetectInput>): Promise<AiccVisionDetectResponse>;
696
- visionSegment(request: AiccTypedMethodCall<AiccVisionSegmentInput>): Promise<AiccVisionSegmentResponse>;
697
- audioTts(request: AiccTypedMethodCall<AiccAudioTtsInput>): Promise<AiccAudioResponse>;
698
- audioAsr(request: AiccTypedMethodCall<AiccAudioAsrInput>): Promise<AiccAudioResponse>;
699
- audioMusic(request: AiccTypedMethodCall<AiccAudioMusicInput>): Promise<AiccAudioResponse>;
700
- audioEnhance(request: AiccTypedMethodCall<AiccAudioEnhanceInput>): Promise<AiccAudioResponse>;
701
- videoTxt2video(request: AiccTypedMethodCall<AiccVideoTxt2videoInput>): Promise<AiccVideoResponse>;
702
- videoImg2video(request: AiccTypedMethodCall<AiccVideoImg2videoInput>): Promise<AiccVideoResponse>;
703
- videoVideo2video(request: AiccTypedMethodCall<AiccVideoVideo2videoInput>): Promise<AiccVideoResponse>;
704
- videoExtend(request: AiccTypedMethodCall<AiccVideoExtendInput>): Promise<AiccVideoResponse>;
705
- videoUpscale(request: AiccTypedMethodCall<AiccVideoUpscaleInput>): Promise<AiccVideoResponse>;
706
- agentComputerUse(request: AiccTypedMethodCall<AiccAgentComputerUseInput>): Promise<AiccAgentComputerUseResponse>;
707
- cancel(taskId: string): Promise<AiccCancelResponse>;
708
- reloadSettings(): Promise<unknown>;
709
- serviceReloadSettings(): Promise<unknown>;
710
- queryQuota(request: AiccQuotaQueryRequest): Promise<AiccQuotaQueryResponse>;
711
- listProviders(request?: AiccProviderListRequest): Promise<unknown>;
712
- providerHealth(request: AiccProviderHealthRequest): Promise<unknown>;
713
- }
1271
+ private call;
1272
+ private inference;
1273
+ routeResolve(r: RouteResolveRequest): Promise<RouteResolveResponse>;
1274
+ chatCompletionsCreate(r: LlmChatInvokeRequest): Promise<LlmChatInvokeResponse>;
1275
+ imagesGenerate(r: TextToImageInvokeRequest): Promise<TextToImageInvokeResponse>;
1276
+ helperLlmChat(r: LlmChatHelperRequest): Promise<LlmChatInvokeResponse>;
1277
+ helperTextToImage(r: TextToImageHelperRequest): Promise<TextToImageInvokeResponse>;
1278
+ embeddingText(r: EmbeddingTextRequest): Promise<EmbeddingTextResponse>;
1279
+ embeddingMultimodal(r: EmbeddingMultimodalRequest): Promise<EmbeddingTextResponse>;
1280
+ decisionEvaluate(r: DecisionEvaluateRequest): Promise<DecisionEvaluateResponse>;
1281
+ rerank(r: RerankRequest): Promise<RerankResponse>;
1282
+ imageToImage(r: ImageToImageRequest): Promise<ImageToImageResponse>;
1283
+ imageInpaint(r: ImageInpaintRequest): Promise<ImageToImageResponse>;
1284
+ imageUpscale(r: ImageUpscaleRequest): Promise<ImageUpscaleResponse>;
1285
+ imageBackgroundRemove(r: ImageBackgroundRemoveRequest): Promise<ImageUpscaleResponse>;
1286
+ visionOcr(r: VisionOcrRequest): Promise<VisionOcrResponse>;
1287
+ visionCaption(r: VisionCaptionRequest): Promise<VisionCaptionResponse>;
1288
+ visionDetect(r: VisionDetectRequest): Promise<VisionDetectResponse>;
1289
+ visionSegment(r: VisionSegmentRequest): Promise<VisionSegmentResponse>;
1290
+ audioTextToSpeech(r: AudioTextToSpeechRequest): Promise<AudioTextToSpeechResponse>;
1291
+ audioSpeechRecognition(r: AudioSpeechRecognitionRequest): Promise<AudioSpeechRecognitionResponse>;
1292
+ audioMusic(r: AudioMusicRequest): Promise<AudioMusicResponse>;
1293
+ audioEnhance(r: AudioEnhanceRequest): Promise<AudioEnhanceResponse>;
1294
+ videoTextToVideo(r: VideoTextToVideoRequest): Promise<VideoResponse>;
1295
+ videoImageToVideo(r: VideoImageToVideoRequest): Promise<VideoResponse>;
1296
+ videoToVideo(r: VideoToVideoRequest): Promise<VideoResponse>;
1297
+ videoExtend(r: VideoExtendRequest): Promise<VideoResponse>;
1298
+ videoUpscale(r: VideoUpscaleRequest): Promise<VideoResponse>;
1299
+ computerUse(r: ComputerUseRequest): Promise<ComputerUseResponse>;
1300
+ cancel(taskId: string): Promise<CancelResponse>;
1301
+ reloadSettings(): Promise<ServiceReloadSettingsResponse>;
1302
+ queryQuota(r?: QuotaQueryRequest): Promise<QuotaQueryResponse>;
1303
+ queryUsage(r: QueryUsageRequest): Promise<QueryUsageResponse>;
1304
+ queryTrace(r?: QueryRouteTraceRequest): Promise<QueryRouteTraceResponse>;
1305
+ previewRouting(r?: RoutingPreviewRequest): Promise<RoutingPreviewResponse>;
1306
+ getRouting(): Promise<RoutingGetResponse>;
1307
+ updateRouting(r: RoutingUpdateRequest): Promise<RoutingUpdateResponse>;
1308
+ providerCatalog(): Promise<ProviderCatalogResponse>;
1309
+ listProtocolAdapters(): Promise<ProtocolAdapterListResponse>;
1310
+ validateProvider(r: ProviderValidateRequest): Promise<ProviderValidateResponse>;
1311
+ addProvider(r: ProviderAddRequest): Promise<ProviderAddResponse>;
1312
+ listProviders(r?: ProviderListRequest): Promise<ProviderListResponse>;
1313
+ providerHealth(r: ProviderHealthRequest): Promise<ProviderHealthResponse>;
1314
+ updateProvider(r: ProviderUpdateRequest): Promise<ProviderUpdateResponse>;
1315
+ deleteProvider(r: ProviderDeleteRequest): Promise<ProviderDeleteResponse>;
1316
+ refreshProviderModels(r: ProviderRefreshModelsRequest): Promise<ProviderRefreshModelsResponse>;
1317
+ listModels(): Promise<JsonValue>;
1318
+ getDriverMetadataUpdate(): Promise<DriverMetadataUpdateView>;
1319
+ setDriverMetadataUpdate(r: DriverMetadataUpdateSetReq): Promise<DriverMetadataUpdateSetResponse>;
1320
+ }
1321
+ export declare function decisionRequirements(request: Pick<DecisionEvaluateRequest, 'state' | 'questions'>): ModelRequirement;
1322
+ export declare function validateDecisionRequest(request: DecisionEvaluateRequest): void;
1323
+ export declare function validateDecisionAnswers(request: DecisionEvaluateRequest, answers: DecisionAnswer[]): void;
1324
+ export {};
714
1325
  //# sourceMappingURL=aicc_client.d.ts.map