mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-19 01:04:45 +00:00
14 lines
554 B
TypeScript
14 lines
554 B
TypeScript
import { normalizeLowercaseStringOrEmpty } from "../shared/string-coerce.js";
|
|
|
|
export function normalizeModelCatalogProviderId(provider: string): string {
|
|
return normalizeLowercaseStringOrEmpty(provider);
|
|
}
|
|
|
|
export function buildModelCatalogRef(provider: string, modelId: string): string {
|
|
return `${normalizeModelCatalogProviderId(provider)}/${modelId}`;
|
|
}
|
|
|
|
export function buildModelCatalogMergeKey(provider: string, modelId: string): string {
|
|
return `${normalizeModelCatalogProviderId(provider)}::${normalizeLowercaseStringOrEmpty(modelId)}`;
|
|
}
|