Skip to content

Commit 116a80c

Browse files
authored
chore(code): rename claude -> claude code, format glm name (#3055)
## Problem 1. "claude" in the model switcher might not be super clear that it's claude code harness 2. glm model name is wonky <!-- Who is this for and what problem does it solve? --> <!-- Closes #ISSUE_ID --> ## Changes 1. rename "switch to claude" -> "switch to claude code" 2. format cf model names <!-- What did you change and why? --> <!-- If there are frontend changes, include screenshots. --> ## How did you test this? manually <!-- Describe what you tested -- manual steps, automated tests, or both. --> <!-- If you're an agent, only list tests you actually ran. --> ## Automatic notifications - [ ] Publish to changelog? - [ ] Alert Sales and Marketing teams?
1 parent 15397d0 commit 116a80c

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)