@byok-sdk/keys 0.4.2 → 0.5.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.
@@ -0,0 +1,51 @@
1
+ import { z } from 'zod';
2
+ export declare const PI_THINKING_LEVELS: readonly ['off', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max'];
3
+ /** Local declared Pi configuration, without identity, endpoint, headers or secrets. */
4
+ export declare const PiModelConfigSchema: z.ZodObject<{
5
+ contextWindow: z.ZodNumber;
6
+ maxTokens: z.ZodNumber;
7
+ reasoning: z.ZodBoolean;
8
+ thinkingLevel: z.ZodEnum<{
9
+ high: "high";
10
+ low: "low";
11
+ max: "max";
12
+ medium: "medium";
13
+ minimal: "minimal";
14
+ off: "off";
15
+ xhigh: "xhigh";
16
+ }>;
17
+ thinkingLevelMap: z.ZodObject<{
18
+ off: z.ZodNullable<z.ZodString>;
19
+ minimal: z.ZodNullable<z.ZodString>;
20
+ low: z.ZodNullable<z.ZodString>;
21
+ medium: z.ZodNullable<z.ZodString>;
22
+ high: z.ZodNullable<z.ZodString>;
23
+ xhigh: z.ZodNullable<z.ZodString>;
24
+ max: z.ZodNullable<z.ZodString>;
25
+ }, z.core.$strict>;
26
+ compat: z.ZodObject<{
27
+ supportsStore: z.ZodOptional<z.ZodBoolean>;
28
+ supportsDeveloperRole: z.ZodOptional<z.ZodBoolean>;
29
+ supportsReasoningEffort: z.ZodOptional<z.ZodBoolean>;
30
+ supportsUsageInStreaming: z.ZodOptional<z.ZodBoolean>;
31
+ maxTokensField: z.ZodOptional<z.ZodEnum<{
32
+ max_completion_tokens: "max_completion_tokens";
33
+ max_tokens: "max_tokens";
34
+ }>>;
35
+ thinkingFormat: z.ZodOptional<z.ZodEnum<{
36
+ "ant-ling": "ant-ling";
37
+ baseten: "baseten";
38
+ "chat-template": "chat-template";
39
+ deepseek: "deepseek";
40
+ openai: "openai";
41
+ openrouter: "openrouter";
42
+ qwen: "qwen";
43
+ "qwen-chat-template": "qwen-chat-template";
44
+ "string-thinking": "string-thinking";
45
+ together: "together";
46
+ zai: "zai";
47
+ }>>;
48
+ zaiToolStream: z.ZodOptional<z.ZodBoolean>;
49
+ }, z.core.$strict>;
50
+ }, z.core.$strict>;
51
+ export type PiModelConfig = z.infer<typeof PiModelConfigSchema>;
@@ -2,6 +2,8 @@ import { type ExactProviderProfileBinding, type ModelProviderProfile, type Provi
2
2
  import { type SecretStore } from './secret-store';
3
3
  export interface PiProviderLauncherOptions {
4
4
  piBin: string;
5
+ /** Explicit script entry for the selected interpreter; never inferred from a filename. */
6
+ piEntry?: string;
5
7
  profileDbPath: string;
6
8
  /** Carried by the `--provider` flag: the exact local profile to launch. */
7
9
  profileRef: ProviderProfileRef;
@@ -78,6 +78,53 @@ export declare const ModelProviderProfileSchema: z.ZodObject<{
78
78
  enabled: z.ZodBoolean;
79
79
  kind: z.ZodLiteral<"model">;
80
80
  model: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
81
+ pi_model: z.ZodOptional<z.ZodObject<{
82
+ contextWindow: z.ZodNumber;
83
+ maxTokens: z.ZodNumber;
84
+ reasoning: z.ZodBoolean;
85
+ thinkingLevel: z.ZodEnum<{
86
+ high: "high";
87
+ low: "low";
88
+ max: "max";
89
+ medium: "medium";
90
+ minimal: "minimal";
91
+ off: "off";
92
+ xhigh: "xhigh";
93
+ }>;
94
+ thinkingLevelMap: z.ZodObject<{
95
+ off: z.ZodNullable<z.ZodString>;
96
+ minimal: z.ZodNullable<z.ZodString>;
97
+ low: z.ZodNullable<z.ZodString>;
98
+ medium: z.ZodNullable<z.ZodString>;
99
+ high: z.ZodNullable<z.ZodString>;
100
+ xhigh: z.ZodNullable<z.ZodString>;
101
+ max: z.ZodNullable<z.ZodString>;
102
+ }, z.core.$strict>;
103
+ compat: z.ZodObject<{
104
+ supportsStore: z.ZodOptional<z.ZodBoolean>;
105
+ supportsDeveloperRole: z.ZodOptional<z.ZodBoolean>;
106
+ supportsReasoningEffort: z.ZodOptional<z.ZodBoolean>;
107
+ supportsUsageInStreaming: z.ZodOptional<z.ZodBoolean>;
108
+ maxTokensField: z.ZodOptional<z.ZodEnum<{
109
+ max_completion_tokens: "max_completion_tokens";
110
+ max_tokens: "max_tokens";
111
+ }>>;
112
+ thinkingFormat: z.ZodOptional<z.ZodEnum<{
113
+ "ant-ling": "ant-ling";
114
+ baseten: "baseten";
115
+ "chat-template": "chat-template";
116
+ deepseek: "deepseek";
117
+ openai: "openai";
118
+ openrouter: "openrouter";
119
+ qwen: "qwen";
120
+ "qwen-chat-template": "qwen-chat-template";
121
+ "string-thinking": "string-thinking";
122
+ together: "together";
123
+ zai: "zai";
124
+ }>>;
125
+ zaiToolStream: z.ZodOptional<z.ZodBoolean>;
126
+ }, z.core.$strict>;
127
+ }, z.core.$strict>>;
81
128
  profile_ref: z.ZodString;
82
129
  provider_kind: z.ZodEnum<{
83
130
  "ant-ling": "ant-ling";
@@ -2,6 +2,7 @@ import { AnthropicMessagesClient } from './anthropic-client';
2
2
  import type { ProviderFetch } from './http';
3
3
  import { OpenAiCompatibleChatClient } from './openai-client';
4
4
  import type { ProviderProfileStore } from './profile-store';
5
+ import type { PiModelConfig } from './pi-model-config';
5
6
  import { type ModelProviderAdapter, type ModelProviderKind, type ProviderAuthMode, type ProviderModelCapability, type ProviderProfileRef } from './provider-profile';
6
7
  import { type ModelProviderSecretName, type SecretStore } from './secret-store';
7
8
  /** A transport client for whichever dialect the resolved profile declares. */
@@ -13,6 +14,8 @@ export type ModelProviderClient = AnthropicMessagesClient | OpenAiCompatibleChat
13
14
  * persisted data.
14
15
  */
15
16
  export interface ProviderConfiguration {
17
+ /** Required for Pi execution; omitted profiles remain direct-transport-only. */
18
+ pi_model?: PiModelConfig;
16
19
  adapter: ModelProviderAdapter;
17
20
  auth_mode: ProviderAuthMode;
18
21
  base_url: string;
@@ -38,6 +41,7 @@ export interface ProviderConfiguration {
38
41
  * plaintext key".
39
42
  */
40
43
  export interface ProviderStatus {
44
+ pi_model?: PiModelConfig;
41
45
  adapter: ModelProviderAdapter;
42
46
  auth_mode: ProviderAuthMode;
43
47
  base_url: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byok-sdk/keys",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "description": "BYOK SDK key management: provider profiles, credential-backed auth headers, and direct provider transports",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -48,7 +48,7 @@
48
48
  "clean": "rm -rf dist"
49
49
  },
50
50
  "dependencies": {
51
- "@byok-sdk/core": "0.16.0",
51
+ "@byok-sdk/core": "0.18.0",
52
52
  "zod": "^4.4.3"
53
53
  }
54
54
  }