Download src/utils/model/aliases.ts from chenbhao/codev: direct link, hf CLI and curl.
- Browser
- Download file 793 Bytes
-
https://huggingface.co/chenbhao/codev/resolve/afbc7edaae4e6bb0102ba024b49ce8be89d2264c/src/utils/model/aliases.ts
- Command line
-
hf download hf://chenbhao/codev@afbc7edaae4e6bb0102ba024b49ce8be89d2264c/src/utils/model/aliases.ts
-
curl -L -o aliases.ts https://huggingface.co/chenbhao/codev/resolve/afbc7edaae4e6bb0102ba024b49ce8be89d2264c/src/utils/model/aliases.ts
793 Bytes
| export const MODEL_ALIASES = [ | |
| 'sonnet', | |
| 'opus', | |
| 'haiku', | |
| 'best', | |
| 'sonnet[1m]', | |
| 'opus[1m]', | |
| 'opusplan', | |
| ] as const | |
| export type ModelAlias = (typeof MODEL_ALIASES)[number] | |
| export function isModelAlias(modelInput: string): modelInput is ModelAlias { | |
| return MODEL_ALIASES.includes(modelInput as ModelAlias) | |
| } | |
| /** | |
| * Bare model family aliases that act as wildcards in the availableModels allowlist. | |
| * When "opus" is in the allowlist, ANY opus model is allowed (opus 4.5, 4.6, etc.). | |
| * When a specific model ID is in the allowlist, only that exact version is allowed. | |
| */ | |
| export const MODEL_FAMILY_ALIASES = ['sonnet', 'opus', 'haiku'] as const | |
| export function isModelFamilyAlias(model: string): boolean { | |
| return (MODEL_FAMILY_ALIASES as readonly string[]).includes(model) | |
| } | |