@oh-my-pi/pi-catalog 17.1.7 → 17.2.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.
@@ -136,6 +136,19 @@ export declare function modelMatchesHost(model: {
136
136
  provider: string;
137
137
  baseUrl: string;
138
138
  }, host: KnownHost): boolean;
139
+ /**
140
+ * Hostname for a Vertex AI GenerateContent / rawPredict / OpenAI-compat
141
+ * request for the given location.
142
+ *
143
+ * - `global` → global endpoint (`aiplatform.googleapis.com`)
144
+ * - `eu` / `us` multi-regions → REP endpoints (`aiplatform.{eu|us}.rep.googleapis.com`)
145
+ * - every other location → regional (`{location}-aiplatform.googleapis.com`)
146
+ *
147
+ * Multi-region codes do NOT follow the regional `{location}-aiplatform` pattern;
148
+ * interpolating them that way yields hosts like `eu-aiplatform.googleapis.com`
149
+ * that 404.
150
+ */
151
+ export declare function resolveVertexEndpointHost(location: string): string;
139
152
  /** Vertex AI express-mode OpenAI-compatible endpoint (`…/endpoints/openapi`). */
140
153
  export declare function isVertexExpressOpenAIUrl(baseUrl: string): boolean;
141
154
  /** Vertex AI Anthropic raw-predict endpoints (`:streamRawPredict` / `:rawPredict`). */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-catalog",
4
- "version": "17.1.7",
4
+ "version": "17.2.0",
5
5
  "description": "Model catalog for omp: bundled model database, provider discovery descriptors, model identity, classification, and equivalence",
6
6
  "homepage": "https://omp.sh",
7
7
  "author": "Can Boluk",
@@ -30,16 +30,17 @@
30
30
  "test": "bun test --parallel",
31
31
  "fix": "biome check --write --unsafe .",
32
32
  "fmt": "biome format --write .",
33
- "gen:models": "bun scripts/generate-models.ts"
33
+ "gen:models": "bun scripts/generate-models.ts",
34
+ "gen:cursor-proto": "protoc --plugin=protoc-gen-es=../../node_modules/.bin/protoc-gen-es --es_out=src/discovery/cursor-gen --es_opt=target=ts -I ../ai/src/providers/cursor/proto ../ai/src/providers/cursor/proto/agent.proto"
34
35
  },
35
36
  "dependencies": {
36
37
  "@bufbuild/protobuf": "^2.12.1",
37
- "@oh-my-pi/pi-utils": "17.1.7",
38
+ "@oh-my-pi/pi-utils": "17.2.0",
38
39
  "arktype": "2.2.3",
39
40
  "zod": "^4"
40
41
  },
41
42
  "devDependencies": {
42
- "@oh-my-pi/pi-ai": "17.1.7",
43
+ "@oh-my-pi/pi-ai": "17.2.0",
43
44
  "@types/bun": "^1.3.14"
44
45
  },
45
46
  "engines": {
@@ -226,6 +226,12 @@ function detectStrictModeSupport(provider: string, baseUrl: string): boolean {
226
226
  */
227
227
  const LOCAL_OPENAI_COMPAT_PROVIDERS = new Set(["llama.cpp", "lm-studio", "vllm", "ollama"]);
228
228
 
229
+ /** Hosts that accept only none/auto/required rather than a named tool-choice object. */
230
+ const STRING_ONLY_NAMED_TOOL_CHOICE_PROVIDERS: Record<string, true> = {
231
+ "llama.cpp": true,
232
+ "lm-studio": true,
233
+ };
234
+
229
235
  /**
230
236
  * Local proxy providers that share the loopback-default baseUrl but forward
231
237
  * to an unrelated upstream (OpenAI, Anthropic, …) rather than running a
@@ -481,7 +487,7 @@ export function buildOpenAICompat(spec: ModelSpec<"openai-completions">): Resolv
481
487
  disableReasoningOnToolChoice: isDeepseekFamily && Boolean(spec.reasoning) && !isOpenRouter,
482
488
  supportsToolChoice: !isDirectDeepseekReasoning,
483
489
  supportsForcedToolChoice: !requiresEnabledThinking,
484
- supportsNamedToolChoice: provider !== "llama.cpp",
490
+ supportsNamedToolChoice: STRING_ONLY_NAMED_TOOL_CHOICE_PROVIDERS[provider] !== true,
485
491
  maxTokensField: useMaxTokens ? "max_tokens" : "max_completion_tokens",
486
492
  requiresToolResultName: isMistral,
487
493
  requiresAssistantAfterToolResult: isMistral,
@@ -686,7 +692,7 @@ export function buildOpenAIResponsesCompat(spec: OpenAIResponsesSpecLike): Resol
686
692
  disableReasoningOnToolChoice: isDeepseekFamily && reasoningCapable && !isOpenRouter,
687
693
  supportsToolChoice: true,
688
694
  supportsForcedToolChoice: true,
689
- supportsNamedToolChoice: true,
695
+ supportsNamedToolChoice: STRING_ONLY_NAMED_TOOL_CHOICE_PROVIDERS[spec.provider] !== true,
690
696
  reasoningContentField: "reasoning_content",
691
697
  requiresReasoningContentForToolCalls:
692
698
  (isKimiModel || (isDeepseekFamily && reasoningCapable) || (isOpenRouter && reasoningCapable)) &&