Skip to content

Commit 3fe9f10

Browse files
authored
Merge branch 'main' into cloud-skills-dependency-autobundle
2 parents 42720c8 + 9dbf01e commit 3fe9f10

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

packages/agent/src/gateway-models.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,18 @@ describe("formatGatewayModelName", () => {
5555
).toBe("gpt-5.5");
5656
});
5757

58+
it("formats Cloudflare models as the lowercase final path segment", () => {
59+
expect(
60+
formatGatewayModelName({
61+
id: "@cf/zai-org/glm-5.2",
62+
owned_by: "cloudflare",
63+
context_window: 128000,
64+
supports_streaming: true,
65+
supports_vision: false,
66+
}),
67+
).toBe("glm-5.2");
68+
});
69+
5870
it("blocks deprecated Claude gateway models", () => {
5971
expect(isBlockedModelId("claude-opus-4-5")).toBe(true);
6072
expect(isBlockedModelId("claude-opus-4-6")).toBe(true);

packages/agent/src/gateway-models.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,10 @@ export function getClaudeModelRecency(modelId: string): number {
221221
const PROVIDER_PREFIXES = ["anthropic/", "openai/", "google-vertex/"];
222222

223223
export function formatGatewayModelName(model: GatewayModel): string {
224+
if (isCloudflareModel(model)) {
225+
return (model.id.split("/").pop() ?? model.id).toLowerCase();
226+
}
227+
224228
if (isOpenAIModel(model)) {
225229
return stripProviderPrefix(model.id).toLowerCase();
226230
}

packages/ui/src/features/sessions/components/UnifiedModelSelector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const ADAPTER_ICONS: Record<AgentAdapter, React.ReactNode> = {
3131
};
3232

3333
const ADAPTER_LABELS: Record<AgentAdapter, string> = {
34-
claude: "Claude",
34+
claude: "Claude Code",
3535
codex: "Codex",
3636
};
3737

0 commit comments

Comments
 (0)