fix: improve UI (#403)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Charles Packer
2025-12-27 01:55:13 -08:00
committed by GitHub
parent aa4071c721
commit 424e4980ac
8 changed files with 124 additions and 73 deletions

View File

@@ -69,6 +69,16 @@ export function getModelUpdateArgs(
return modelInfo?.updateArgs;
}
/**
* Get a display-friendly name for a model by its handle
* @param handle - The full model handle (e.g., "anthropic/claude-sonnet-4-5-20250929")
* @returns The display name (e.g., "Sonnet 4.5") if found, null otherwise
*/
export function getModelDisplayName(handle: string): string | null {
const model = models.find((m) => m.handle === handle);
return model?.label ?? null;
}
/**
* Resolve a model ID from the llm_config.model value
* The llm_config.model is the model portion without the provider prefix