pullfrog 0.1.9 → 0.1.11
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/dist/agents/shared.d.ts +2 -0
- package/dist/cli.mjs +246 -86
- package/dist/index.js +245 -85
- package/dist/internal.js +19 -0
- package/dist/models.d.ts +20 -8
- package/dist/utils/vertex.d.ts +16 -0
- package/package.json +1 -1
package/dist/models.d.ts
CHANGED
|
@@ -10,15 +10,17 @@
|
|
|
10
10
|
*
|
|
11
11
|
* `"bedrock"` means the actual model ID comes from `BEDROCK_MODEL_ID`
|
|
12
12
|
* (an AWS-canonical Bedrock model ID like `us.anthropic.claude-opus-4-7`
|
|
13
|
-
* or `amazon.nova-pro-v1:0`).
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
13
|
+
* or `amazon.nova-pro-v1:0`). `"vertex"` means the actual model ID comes
|
|
14
|
+
* from `VERTEX_MODEL_ID` (a Vertex AI model ID like
|
|
15
|
+
* `claude-opus-4-1@20250805` or `gemini-2.5-pro`). enterprise hosted-model
|
|
16
|
+
* customers self-select for version control — silent alias bumps would break
|
|
17
|
+
* compliance review, model-access enrollment, and provisioned-throughput
|
|
18
|
+
* contracts. so the single `bedrock/byok` and `vertex/byok` entries are
|
|
19
|
+
* routing slugs, not model aliases: the harness reads the backend-specific
|
|
20
|
+
* env var and routes to claude-code for Anthropic IDs or opencode for
|
|
21
|
+
* everything else.
|
|
20
22
|
*/
|
|
21
|
-
export type ModelRouting = "bedrock";
|
|
23
|
+
export type ModelRouting = "bedrock" | "vertex";
|
|
22
24
|
export interface ModelAlias {
|
|
23
25
|
/** stable alias stored in DB, e.g. "anthropic/claude-opus" */
|
|
24
26
|
slug: string;
|
|
@@ -84,6 +86,7 @@ export declare const providers: {
|
|
|
84
86
|
moonshotai: ProviderConfig;
|
|
85
87
|
opencode: ProviderConfig;
|
|
86
88
|
bedrock: ProviderConfig;
|
|
89
|
+
vertex: ProviderConfig;
|
|
87
90
|
openrouter: ProviderConfig;
|
|
88
91
|
};
|
|
89
92
|
export type ModelProvider = keyof typeof providers;
|
|
@@ -127,6 +130,8 @@ export declare function resolveCliModel(slug: string): string | undefined;
|
|
|
127
130
|
export declare function resolveOpenRouterModel(slug: string): string | undefined;
|
|
128
131
|
/** env var that supplies the Bedrock model ID for the `bedrock/byok` slug. */
|
|
129
132
|
export declare const BEDROCK_MODEL_ID_ENV = "BEDROCK_MODEL_ID";
|
|
133
|
+
/** env var that supplies the Vertex AI model ID for the `vertex/byok` slug. */
|
|
134
|
+
export declare const VERTEX_MODEL_ID_ENV = "VERTEX_MODEL_ID";
|
|
130
135
|
/**
|
|
131
136
|
* the Bedrock model ID passed to claude-code or opencode is whatever the
|
|
132
137
|
* user set in `BEDROCK_MODEL_ID` — Pullfrog never resolves or upgrades it.
|
|
@@ -153,4 +158,11 @@ export declare const BEDROCK_MODEL_ID_ENV = "BEDROCK_MODEL_ID";
|
|
|
153
158
|
* include the foundation segment in the profile name.
|
|
154
159
|
*/
|
|
155
160
|
export declare function isBedrockAnthropicId(bedrockModelId: string): boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Vertex Anthropic model IDs start with the Claude family name, e.g.
|
|
163
|
+
* `claude-opus-4-1@20250805`. partner-model resource paths can contain the
|
|
164
|
+
* substring "anthropic" elsewhere, so the Bedrock segment check does not
|
|
165
|
+
* transfer — anchor on the model ID prefix instead.
|
|
166
|
+
*/
|
|
167
|
+
export declare function isVertexAnthropicId(vertexModelId: string): boolean;
|
|
156
168
|
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const VERTEX_SERVICE_ACCOUNT_JSON_ENV = "VERTEX_SERVICE_ACCOUNT_JSON";
|
|
2
|
+
export declare const GOOGLE_APPLICATION_CREDENTIALS_ENV = "GOOGLE_APPLICATION_CREDENTIALS";
|
|
3
|
+
export declare const GOOGLE_CLOUD_PROJECT_ENV = "GOOGLE_CLOUD_PROJECT";
|
|
4
|
+
export declare const VERTEX_LOCATION_ENV = "VERTEX_LOCATION";
|
|
5
|
+
export type VertexCredentials = {
|
|
6
|
+
credentialsPath: string;
|
|
7
|
+
secretDir: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function isVertexRoute(model: string | undefined): boolean;
|
|
10
|
+
export declare function readProjectIdFromVertexServiceAccountJson(): string | undefined;
|
|
11
|
+
export declare function materializeVertexCredentials(params: {
|
|
12
|
+
model: string | undefined;
|
|
13
|
+
}): VertexCredentials | undefined;
|
|
14
|
+
export declare function cleanupVertexCredentials(credentials: VertexCredentials | undefined): void;
|
|
15
|
+
export declare function applyClaudeVertexEnv(env: Record<string, string | undefined>): void;
|
|
16
|
+
export declare function resolveVertexOpenCodeModel(model: string | undefined): string | undefined;
|