@codeworksh/aikit 0.4.1-dev.20260530184501 → 0.4.1-dev.20260530192508
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.mts +60 -12
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/registry-Cfdk78qk.mjs.map +1 -1
package/index.d.mts
CHANGED
|
@@ -5424,13 +5424,13 @@ declare namespace Model {
|
|
|
5424
5424
|
function getBuiltInModels(): Promise<BuiltInModels>;
|
|
5425
5425
|
const registry: {
|
|
5426
5426
|
(): Promise<Map<string, Map<string, {
|
|
5427
|
+
headers?: Record<string, string> | undefined;
|
|
5427
5428
|
api?: {
|
|
5428
5429
|
id?: string | undefined;
|
|
5429
5430
|
url?: string | undefined;
|
|
5430
|
-
method?: "
|
|
5431
|
+
method?: "languageModel" | "chat" | "completion" | "completionModel" | "messages" | "responses" | undefined;
|
|
5431
5432
|
} | undefined;
|
|
5432
5433
|
options?: Record<string, unknown> | undefined;
|
|
5433
|
-
headers?: Record<string, string> | undefined;
|
|
5434
5434
|
thinkingLevelMap?: {
|
|
5435
5435
|
off?: string | null | undefined;
|
|
5436
5436
|
minimal?: string | null | undefined;
|
|
@@ -5452,17 +5452,19 @@ declare namespace Model {
|
|
|
5452
5452
|
googleVertexAnthropic?: "anthropic" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-compatible" | "openrouter" | "xai" | undefined;
|
|
5453
5453
|
openaiCompatible?: "anthropic" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-compatible" | "openrouter" | "xai" | undefined;
|
|
5454
5454
|
} | undefined;
|
|
5455
|
-
|
|
5456
|
-
name: string;
|
|
5455
|
+
maxTokens: number;
|
|
5457
5456
|
id: string;
|
|
5457
|
+
name: string;
|
|
5458
5458
|
provider: {
|
|
5459
5459
|
key?: string | undefined;
|
|
5460
5460
|
options?: Record<string, any> | undefined;
|
|
5461
|
-
name: string;
|
|
5462
5461
|
id: string;
|
|
5462
|
+
name: string;
|
|
5463
5463
|
source: "env" | "config" | "custom" | "api" | "unknown";
|
|
5464
5464
|
env: string[];
|
|
5465
5465
|
};
|
|
5466
|
+
baseUrl: string;
|
|
5467
|
+
reasoning: boolean;
|
|
5466
5468
|
input: ("text" | "image")[];
|
|
5467
5469
|
cost: {
|
|
5468
5470
|
input: number;
|
|
@@ -5470,15 +5472,64 @@ declare namespace Model {
|
|
|
5470
5472
|
cacheRead: number;
|
|
5471
5473
|
cacheWrite: number;
|
|
5472
5474
|
};
|
|
5473
|
-
maxTokens: number;
|
|
5474
|
-
baseUrl: string;
|
|
5475
|
-
reasoning: boolean;
|
|
5476
5475
|
contextWindow: number;
|
|
5476
|
+
protocol: "anthropic" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-compatible" | "openrouter" | "xai";
|
|
5477
5477
|
}>>>;
|
|
5478
5478
|
reset(): void;
|
|
5479
5479
|
};
|
|
5480
5480
|
function supportsProtocol(model: Info, protocol: KnownProviderEnum): boolean;
|
|
5481
|
-
function getModel<TProvider extends string, TModel extends Info["id"]>(provider: TProvider, model: TModel, overrides?: Partial<Info>): Promise<
|
|
5481
|
+
function getModel<TProvider extends string, TModel extends Info["id"]>(provider: TProvider, model: TModel, overrides?: Partial<Info>): Promise<{
|
|
5482
|
+
headers?: Record<string, string> | undefined;
|
|
5483
|
+
api?: {
|
|
5484
|
+
id?: string | undefined;
|
|
5485
|
+
url?: string | undefined;
|
|
5486
|
+
method?: "languageModel" | "chat" | "completion" | "completionModel" | "messages" | "responses" | undefined;
|
|
5487
|
+
} | undefined;
|
|
5488
|
+
options?: Record<string, unknown> | undefined;
|
|
5489
|
+
thinkingLevelMap?: {
|
|
5490
|
+
off?: string | null | undefined;
|
|
5491
|
+
minimal?: string | null | undefined;
|
|
5492
|
+
low?: string | null | undefined;
|
|
5493
|
+
medium?: string | null | undefined;
|
|
5494
|
+
high?: string | null | undefined;
|
|
5495
|
+
xhigh?: string | null | undefined;
|
|
5496
|
+
} | undefined;
|
|
5497
|
+
npm?: string | undefined;
|
|
5498
|
+
providerOptionsKey?: string | undefined;
|
|
5499
|
+
providerOptions?: Record<string, unknown> | undefined;
|
|
5500
|
+
supportedProtocols?: {
|
|
5501
|
+
anthropic?: "anthropic" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-compatible" | "openrouter" | "xai" | undefined;
|
|
5502
|
+
google?: "anthropic" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-compatible" | "openrouter" | "xai" | undefined;
|
|
5503
|
+
openai?: "anthropic" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-compatible" | "openrouter" | "xai" | undefined;
|
|
5504
|
+
openrouter?: "anthropic" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-compatible" | "openrouter" | "xai" | undefined;
|
|
5505
|
+
xai?: "anthropic" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-compatible" | "openrouter" | "xai" | undefined;
|
|
5506
|
+
googleVertex?: "anthropic" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-compatible" | "openrouter" | "xai" | undefined;
|
|
5507
|
+
googleVertexAnthropic?: "anthropic" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-compatible" | "openrouter" | "xai" | undefined;
|
|
5508
|
+
openaiCompatible?: "anthropic" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-compatible" | "openrouter" | "xai" | undefined;
|
|
5509
|
+
} | undefined;
|
|
5510
|
+
maxTokens: number;
|
|
5511
|
+
id: string;
|
|
5512
|
+
name: string;
|
|
5513
|
+
provider: {
|
|
5514
|
+
key?: string | undefined;
|
|
5515
|
+
options?: Record<string, any> | undefined;
|
|
5516
|
+
id: string;
|
|
5517
|
+
name: string;
|
|
5518
|
+
source: "env" | "config" | "custom" | "api" | "unknown";
|
|
5519
|
+
env: string[];
|
|
5520
|
+
};
|
|
5521
|
+
baseUrl: string;
|
|
5522
|
+
reasoning: boolean;
|
|
5523
|
+
input: ("text" | "image")[];
|
|
5524
|
+
cost: {
|
|
5525
|
+
input: number;
|
|
5526
|
+
output: number;
|
|
5527
|
+
cacheRead: number;
|
|
5528
|
+
cacheWrite: number;
|
|
5529
|
+
};
|
|
5530
|
+
contextWindow: number;
|
|
5531
|
+
protocol: "anthropic" | "google" | "google-vertex" | "google-vertex-anthropic" | "openai" | "openai-compatible" | "openrouter" | "xai";
|
|
5532
|
+
} | undefined>;
|
|
5482
5533
|
function getProviders(): Promise<string[]>;
|
|
5483
5534
|
function getModels<TProvider extends string>(provider: TProvider): Promise<Info[]>;
|
|
5484
5535
|
/**
|
|
@@ -7080,9 +7131,7 @@ declare namespace Protocol {
|
|
|
7080
7131
|
export function resolveProtocolProvider(model: Model.Info): AnyRegisteredProtocol;
|
|
7081
7132
|
export function getProtocolProviders(): AnyRegisteredProtocol[];
|
|
7082
7133
|
export function stream<TProtocol extends ProtocolWithOptions>(model: Model.TModel<TProtocol>, context: Message.Context, options?: OptionsFor<TProtocol>): AssistantMessageEventStream;
|
|
7083
|
-
export function stream(model: Model.Info, context: Message.Context, options?: CommonOptions): AssistantMessageEventStream;
|
|
7084
7134
|
export function complete<TProtocol extends ProtocolWithOptions>(model: Model.TModel<TProtocol>, context: Message.Context, options?: OptionsFor<TProtocol>): Promise<Message.AssistantMessage>;
|
|
7085
|
-
export function complete(model: Model.Info, context: Message.Context, options?: CommonOptions): Promise<Message.AssistantMessage>;
|
|
7086
7135
|
export function unregisterProtocolProviders(sourceId: string): void;
|
|
7087
7136
|
export function clearProtocolProviders(): void;
|
|
7088
7137
|
export {};
|
|
@@ -7116,7 +7165,6 @@ declare namespace Protocol {
|
|
|
7116
7165
|
*/
|
|
7117
7166
|
type StreamCallable = {
|
|
7118
7167
|
<TProtocol extends Protocol.ProtocolWithOptions>(model: Model.TModel<TProtocol>, context: Message.Context, options?: Protocol.OptionsFor<TProtocol>): AssistantMessageEventStream;
|
|
7119
|
-
(model: Model.Info, context: Message.Context, options?: Protocol.CommonOptions): AssistantMessageEventStream;
|
|
7120
7168
|
complete: typeof Protocol.complete;
|
|
7121
7169
|
resolveProtocolProvider: typeof Protocol.resolveProtocolProvider;
|
|
7122
7170
|
};
|