@mariozechner/pi-ai 0.68.1 → 0.69.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -202,7 +202,7 @@ for (const block of response.content) {
202
202
 
203
203
  ## Tools
204
204
 
205
- Tools enable LLMs to interact with external systems. This library uses TypeBox schemas for type-safe tool definitions with automatic validation using AJV. TypeBox schemas can be serialized and deserialized as plain JSON, making them ideal for distributed systems.
205
+ Tools enable LLMs to interact with external systems. This library uses TypeBox schemas for type-safe tool definitions with automatic validation using TypeBox's built-in validator and value conversion utilities. TypeBox schemas can be serialized and deserialized as plain JSON, making them ideal for distributed systems.
206
206
 
207
207
  ### Defining Tools
208
208
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export type { Static, TSchema } from "@sinclair/typebox";
2
- export { Type } from "@sinclair/typebox";
1
+ export type { Static, TSchema } from "typebox";
2
+ export { Type } from "typebox";
3
3
  export * from "./api-registry.js";
4
4
  export * from "./env-api-keys.js";
5
5
  export * from "./models.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,YAAY,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5F,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAC5G,YAAY,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACzF,cAAc,qBAAqB,CAAC;AACpC,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,YAAY,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACpG,YAAY,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACzF,YAAY,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAClF,YAAY,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC9E,cAAc,kCAAkC,CAAC;AACjD,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,YAAY,EACX,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,WAAW,EACX,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,sBAAsB,GACtB,MAAM,wBAAwB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC","sourcesContent":["export type { Static, TSchema } from \"@sinclair/typebox\";\nexport { Type } from \"@sinclair/typebox\";\n\nexport * from \"./api-registry.js\";\nexport * from \"./env-api-keys.js\";\nexport * from \"./models.js\";\nexport type { BedrockOptions, BedrockThinkingDisplay } from \"./providers/amazon-bedrock.js\";\nexport type { AnthropicEffort, AnthropicOptions, AnthropicThinkingDisplay } from \"./providers/anthropic.js\";\nexport type { AzureOpenAIResponsesOptions } from \"./providers/azure-openai-responses.js\";\nexport * from \"./providers/faux.js\";\nexport type { GoogleOptions } from \"./providers/google.js\";\nexport type { GoogleGeminiCliOptions, GoogleThinkingLevel } from \"./providers/google-gemini-cli.js\";\nexport type { GoogleVertexOptions } from \"./providers/google-vertex.js\";\nexport type { MistralOptions } from \"./providers/mistral.js\";\nexport type { OpenAICodexResponsesOptions } from \"./providers/openai-codex-responses.js\";\nexport type { OpenAICompletionsOptions } from \"./providers/openai-completions.js\";\nexport type { OpenAIResponsesOptions } from \"./providers/openai-responses.js\";\nexport * from \"./providers/register-builtins.js\";\nexport * from \"./stream.js\";\nexport * from \"./types.js\";\nexport * from \"./utils/event-stream.js\";\nexport * from \"./utils/json-parse.js\";\nexport type {\n\tOAuthAuthInfo,\n\tOAuthCredentials,\n\tOAuthLoginCallbacks,\n\tOAuthPrompt,\n\tOAuthProvider,\n\tOAuthProviderId,\n\tOAuthProviderInfo,\n\tOAuthProviderInterface,\n} from \"./utils/oauth/types.js\";\nexport * from \"./utils/overflow.js\";\nexport * from \"./utils/typebox-helpers.js\";\nexport * from \"./utils/validation.js\";\n"]}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,YAAY,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5F,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAC5G,YAAY,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACzF,cAAc,qBAAqB,CAAC;AACpC,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,YAAY,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACpG,YAAY,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACzF,YAAY,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAClF,YAAY,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC9E,cAAc,kCAAkC,CAAC;AACjD,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,YAAY,EACX,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,WAAW,EACX,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,sBAAsB,GACtB,MAAM,wBAAwB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC","sourcesContent":["export type { Static, TSchema } from \"typebox\";\nexport { Type } from \"typebox\";\n\nexport * from \"./api-registry.js\";\nexport * from \"./env-api-keys.js\";\nexport * from \"./models.js\";\nexport type { BedrockOptions, BedrockThinkingDisplay } from \"./providers/amazon-bedrock.js\";\nexport type { AnthropicEffort, AnthropicOptions, AnthropicThinkingDisplay } from \"./providers/anthropic.js\";\nexport type { AzureOpenAIResponsesOptions } from \"./providers/azure-openai-responses.js\";\nexport * from \"./providers/faux.js\";\nexport type { GoogleOptions } from \"./providers/google.js\";\nexport type { GoogleGeminiCliOptions, GoogleThinkingLevel } from \"./providers/google-gemini-cli.js\";\nexport type { GoogleVertexOptions } from \"./providers/google-vertex.js\";\nexport type { MistralOptions } from \"./providers/mistral.js\";\nexport type { OpenAICodexResponsesOptions } from \"./providers/openai-codex-responses.js\";\nexport type { OpenAICompletionsOptions } from \"./providers/openai-completions.js\";\nexport type { OpenAIResponsesOptions } from \"./providers/openai-responses.js\";\nexport * from \"./providers/register-builtins.js\";\nexport * from \"./stream.js\";\nexport * from \"./types.js\";\nexport * from \"./utils/event-stream.js\";\nexport * from \"./utils/json-parse.js\";\nexport type {\n\tOAuthAuthInfo,\n\tOAuthCredentials,\n\tOAuthLoginCallbacks,\n\tOAuthPrompt,\n\tOAuthProvider,\n\tOAuthProviderId,\n\tOAuthProviderInfo,\n\tOAuthProviderInterface,\n} from \"./utils/oauth/types.js\";\nexport * from \"./utils/overflow.js\";\nexport * from \"./utils/typebox-helpers.js\";\nexport * from \"./utils/validation.js\";\n"]}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { Type } from "@sinclair/typebox";
1
+ export { Type } from "typebox";
2
2
  export * from "./api-registry.js";
3
3
  export * from "./env-api-keys.js";
4
4
  export * from "./models.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAI5B,cAAc,qBAAqB,CAAC;AAQpC,cAAc,kCAAkC,CAAC;AACjD,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AAWtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC","sourcesContent":["export type { Static, TSchema } from \"@sinclair/typebox\";\nexport { Type } from \"@sinclair/typebox\";\n\nexport * from \"./api-registry.js\";\nexport * from \"./env-api-keys.js\";\nexport * from \"./models.js\";\nexport type { BedrockOptions, BedrockThinkingDisplay } from \"./providers/amazon-bedrock.js\";\nexport type { AnthropicEffort, AnthropicOptions, AnthropicThinkingDisplay } from \"./providers/anthropic.js\";\nexport type { AzureOpenAIResponsesOptions } from \"./providers/azure-openai-responses.js\";\nexport * from \"./providers/faux.js\";\nexport type { GoogleOptions } from \"./providers/google.js\";\nexport type { GoogleGeminiCliOptions, GoogleThinkingLevel } from \"./providers/google-gemini-cli.js\";\nexport type { GoogleVertexOptions } from \"./providers/google-vertex.js\";\nexport type { MistralOptions } from \"./providers/mistral.js\";\nexport type { OpenAICodexResponsesOptions } from \"./providers/openai-codex-responses.js\";\nexport type { OpenAICompletionsOptions } from \"./providers/openai-completions.js\";\nexport type { OpenAIResponsesOptions } from \"./providers/openai-responses.js\";\nexport * from \"./providers/register-builtins.js\";\nexport * from \"./stream.js\";\nexport * from \"./types.js\";\nexport * from \"./utils/event-stream.js\";\nexport * from \"./utils/json-parse.js\";\nexport type {\n\tOAuthAuthInfo,\n\tOAuthCredentials,\n\tOAuthLoginCallbacks,\n\tOAuthPrompt,\n\tOAuthProvider,\n\tOAuthProviderId,\n\tOAuthProviderInfo,\n\tOAuthProviderInterface,\n} from \"./utils/oauth/types.js\";\nexport * from \"./utils/overflow.js\";\nexport * from \"./utils/typebox-helpers.js\";\nexport * from \"./utils/validation.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAI5B,cAAc,qBAAqB,CAAC;AAQpC,cAAc,kCAAkC,CAAC;AACjD,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AAWtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC","sourcesContent":["export type { Static, TSchema } from \"typebox\";\nexport { Type } from \"typebox\";\n\nexport * from \"./api-registry.js\";\nexport * from \"./env-api-keys.js\";\nexport * from \"./models.js\";\nexport type { BedrockOptions, BedrockThinkingDisplay } from \"./providers/amazon-bedrock.js\";\nexport type { AnthropicEffort, AnthropicOptions, AnthropicThinkingDisplay } from \"./providers/anthropic.js\";\nexport type { AzureOpenAIResponsesOptions } from \"./providers/azure-openai-responses.js\";\nexport * from \"./providers/faux.js\";\nexport type { GoogleOptions } from \"./providers/google.js\";\nexport type { GoogleGeminiCliOptions, GoogleThinkingLevel } from \"./providers/google-gemini-cli.js\";\nexport type { GoogleVertexOptions } from \"./providers/google-vertex.js\";\nexport type { MistralOptions } from \"./providers/mistral.js\";\nexport type { OpenAICodexResponsesOptions } from \"./providers/openai-codex-responses.js\";\nexport type { OpenAICompletionsOptions } from \"./providers/openai-completions.js\";\nexport type { OpenAIResponsesOptions } from \"./providers/openai-responses.js\";\nexport * from \"./providers/register-builtins.js\";\nexport * from \"./stream.js\";\nexport * from \"./types.js\";\nexport * from \"./utils/event-stream.js\";\nexport * from \"./utils/json-parse.js\";\nexport type {\n\tOAuthAuthInfo,\n\tOAuthCredentials,\n\tOAuthLoginCallbacks,\n\tOAuthPrompt,\n\tOAuthProvider,\n\tOAuthProviderId,\n\tOAuthProviderInfo,\n\tOAuthProviderInterface,\n} from \"./utils/oauth/types.js\";\nexport * from \"./utils/overflow.js\";\nexport * from \"./utils/typebox-helpers.js\";\nexport * from \"./utils/validation.js\";\n"]}
@@ -4315,6 +4315,23 @@ export declare const MODELS: {
4315
4315
  contextWindow: number;
4316
4316
  maxTokens: number;
4317
4317
  };
4318
+ readonly "gemini-3.1-flash-lite-preview": {
4319
+ id: string;
4320
+ name: string;
4321
+ api: "google-gemini-cli";
4322
+ provider: string;
4323
+ baseUrl: string;
4324
+ reasoning: true;
4325
+ input: ("image" | "text")[];
4326
+ cost: {
4327
+ input: number;
4328
+ output: number;
4329
+ cacheRead: number;
4330
+ cacheWrite: number;
4331
+ };
4332
+ contextWindow: number;
4333
+ maxTokens: number;
4334
+ };
4318
4335
  readonly "gemini-3.1-pro-preview": {
4319
4336
  id: string;
4320
4337
  name: string;
@@ -7291,12 +7308,9 @@ export declare const MODELS: {
7291
7308
  readonly "qwen3.5-plus": {
7292
7309
  id: string;
7293
7310
  name: string;
7294
- api: "openai-completions";
7311
+ api: "anthropic-messages";
7295
7312
  provider: string;
7296
7313
  baseUrl: string;
7297
- compat: {
7298
- cacheControlFormat: "anthropic";
7299
- };
7300
7314
  reasoning: true;
7301
7315
  input: ("image" | "text")[];
7302
7316
  cost: {
@@ -7311,12 +7325,9 @@ export declare const MODELS: {
7311
7325
  readonly "qwen3.6-plus": {
7312
7326
  id: string;
7313
7327
  name: string;
7314
- api: "openai-completions";
7328
+ api: "anthropic-messages";
7315
7329
  provider: string;
7316
7330
  baseUrl: string;
7317
- compat: {
7318
- cacheControlFormat: "anthropic";
7319
- };
7320
7331
  reasoning: true;
7321
7332
  input: ("image" | "text")[];
7322
7333
  cost: {
@@ -7432,6 +7443,40 @@ export declare const MODELS: {
7432
7443
  contextWindow: number;
7433
7444
  maxTokens: number;
7434
7445
  };
7446
+ readonly "mimo-v2.5": {
7447
+ id: string;
7448
+ name: string;
7449
+ api: "openai-completions";
7450
+ provider: string;
7451
+ baseUrl: string;
7452
+ reasoning: true;
7453
+ input: ("image" | "text")[];
7454
+ cost: {
7455
+ input: number;
7456
+ output: number;
7457
+ cacheRead: number;
7458
+ cacheWrite: number;
7459
+ };
7460
+ contextWindow: number;
7461
+ maxTokens: number;
7462
+ };
7463
+ readonly "mimo-v2.5-pro": {
7464
+ id: string;
7465
+ name: string;
7466
+ api: "openai-completions";
7467
+ provider: string;
7468
+ baseUrl: string;
7469
+ reasoning: true;
7470
+ input: "text"[];
7471
+ cost: {
7472
+ input: number;
7473
+ output: number;
7474
+ cacheRead: number;
7475
+ cacheWrite: number;
7476
+ };
7477
+ contextWindow: number;
7478
+ maxTokens: number;
7479
+ };
7435
7480
  readonly "minimax-m2.5": {
7436
7481
  id: string;
7437
7482
  name: string;
@@ -7469,12 +7514,9 @@ export declare const MODELS: {
7469
7514
  readonly "qwen3.5-plus": {
7470
7515
  id: string;
7471
7516
  name: string;
7472
- api: "openai-completions";
7517
+ api: "anthropic-messages";
7473
7518
  provider: string;
7474
7519
  baseUrl: string;
7475
- compat: {
7476
- cacheControlFormat: "anthropic";
7477
- };
7478
7520
  reasoning: true;
7479
7521
  input: ("image" | "text")[];
7480
7522
  cost: {
@@ -7489,12 +7531,9 @@ export declare const MODELS: {
7489
7531
  readonly "qwen3.6-plus": {
7490
7532
  id: string;
7491
7533
  name: string;
7492
- api: "openai-completions";
7534
+ api: "anthropic-messages";
7493
7535
  provider: string;
7494
7536
  baseUrl: string;
7495
- compat: {
7496
- cacheControlFormat: "anthropic";
7497
- };
7498
7537
  reasoning: true;
7499
7538
  input: ("image" | "text")[];
7500
7539
  cost: {
@@ -7882,6 +7921,23 @@ export declare const MODELS: {
7882
7921
  contextWindow: number;
7883
7922
  maxTokens: number;
7884
7923
  };
7924
+ readonly "arcee-ai/trinity-large-preview": {
7925
+ id: string;
7926
+ name: string;
7927
+ api: "openai-completions";
7928
+ provider: string;
7929
+ baseUrl: string;
7930
+ reasoning: false;
7931
+ input: "text"[];
7932
+ cost: {
7933
+ input: number;
7934
+ output: number;
7935
+ cacheRead: number;
7936
+ cacheWrite: number;
7937
+ };
7938
+ contextWindow: number;
7939
+ maxTokens: number;
7940
+ };
7885
7941
  readonly "arcee-ai/trinity-large-preview:free": {
7886
7942
  id: string;
7887
7943
  name: string;
@@ -11486,6 +11542,40 @@ export declare const MODELS: {
11486
11542
  contextWindow: number;
11487
11543
  maxTokens: number;
11488
11544
  };
11545
+ readonly "xiaomi/mimo-v2.5": {
11546
+ id: string;
11547
+ name: string;
11548
+ api: "openai-completions";
11549
+ provider: string;
11550
+ baseUrl: string;
11551
+ reasoning: true;
11552
+ input: ("image" | "text")[];
11553
+ cost: {
11554
+ input: number;
11555
+ output: number;
11556
+ cacheRead: number;
11557
+ cacheWrite: number;
11558
+ };
11559
+ contextWindow: number;
11560
+ maxTokens: number;
11561
+ };
11562
+ readonly "xiaomi/mimo-v2.5-pro": {
11563
+ id: string;
11564
+ name: string;
11565
+ api: "openai-completions";
11566
+ provider: string;
11567
+ baseUrl: string;
11568
+ reasoning: true;
11569
+ input: "text"[];
11570
+ cost: {
11571
+ input: number;
11572
+ output: number;
11573
+ cacheRead: number;
11574
+ cacheWrite: number;
11575
+ };
11576
+ contextWindow: number;
11577
+ maxTokens: number;
11578
+ };
11489
11579
  readonly "z-ai/glm-4-32b": {
11490
11580
  id: string;
11491
11581
  name: string;