Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions packages/llm-info/src/providers/zima.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { ModelProvider } from "../types.js";

export const Zima: ModelProvider = {
models: [
{
model: "gpt-4o",
displayName: "GPT-4o (Zima)",
contextLength: 128000,
description:
"OpenAI's GPT-4o served through Zima's privacy-preserving infrastructure. Zima's hardware ensures prompts and outputs are never visible to the provider.",
regex: /gpt-4o/i,
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot May 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Model regex /gpt-4o/i is a non-anchored substring match placed before /gpt-4o-mini/i, so findLlmInfo('gpt-4o-mini') matches the gpt-4o entry first and returns wrong metadata (missing 'autocomplete' recommendation, wrong display name). Anchor the regex to avoid collision: /^gpt-4o$/i.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/llm-info/src/providers/zima.ts, line 11:

<comment>Model regex `/gpt-4o/i` is a non-anchored substring match placed before `/gpt-4o-mini/i`, so `findLlmInfo('gpt-4o-mini')` matches the `gpt-4o` entry first and returns wrong metadata (missing 'autocomplete' recommendation, wrong display name). Anchor the regex to avoid collision: `/^gpt-4o$/i`.</comment>

<file context>
@@ -0,0 +1,26 @@
+      contextLength: 128000,
+      description:
+        "OpenAI's GPT-4o served through Zima's privacy-preserving infrastructure. Zima's hardware ensures prompts and outputs are never visible to the provider.",
+      regex: /gpt-4o/i,
+      recommendedFor: ["chat"],
+    },
</file context>
Suggested change
regex: /gpt-4o/i,
+ regex: /^gpt-4o$/i,
Fix with Cubic

recommendedFor: ["chat"],
},
{
model: "gpt-4o-mini",
displayName: "GPT-4o Mini (Zima)",
contextLength: 128000,
description:
"Faster, lightweight GPT-4o Mini served through Zima's privacy-preserving infrastructure.",
regex: /gpt-4o-mini/i,
recommendedFor: ["chat", "autocomplete"],
},
],
id: "zima",
displayName: "Zima",
};
Loading