@@ -155,24 +155,11 @@ async function getAnthropicApiKey(): Promise<string | null> {
155155 return null;
156156 }
157157
158-/**
159- * Strip the trailing date suffix from an Anthropic model ID to produce the
160- * short alias that the OAuth / Claude Code inference endpoint expects.
161- * e.g. "claude-sonnet-4-6-20250725" → "claude-sonnet-4-6"
162- * "claude-opus-4-0-20250514" → "claude-opus-4-0"
163- * Returns null if the ID has no date suffix.
164- */
165-function stripAnthropicDateSuffix(modelId: string): string | null {
166- const match = modelId.match(/^(.+)-(\d{8})$/);
167- return match?.[1] ?? null;
168-}
169-
170158 async function fetchAnthropicModels(): Promise<
171159 ProviderModelCandidate[] | null
172160 > {
173161 const key = await getAnthropicApiKey();
174162 if (!key) return null;
175- const usingOAuth = !process.env.ANTHROPIC_API_KEY;
176163
177164 const payload = await fetchJson(
178165 `${ANTHROPIC_BASE}/v1/models`,
@@ -190,12 +177,8 @@ async function fetchAnthropicModels(): Promise<
190177 item.display_name.trim().length > 0
191178 ? item.display_name
192179 : modelId;
193- // OAuth inference requires short aliases (no date suffix).
194- const effectiveId = usingOAuth
195- ? (stripAnthropicDateSuffix(modelId) ?? modelId)
196- : modelId;
197180 return {
198- providerModelId: effectiveId,
181+ providerModelId: modelId,
199182 displayName,
200183 contextWindow: null,
201184 free: false,