mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 03:00:21 +00:00
refactor: dedupe provider lowercase helpers
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
type SecretInput,
|
||||
} from "openclaw/plugin-sdk/provider-auth";
|
||||
import type { ModelApi, ModelProviderConfig } from "openclaw/plugin-sdk/provider-model-shared";
|
||||
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime";
|
||||
|
||||
export const PROVIDER_ID = "microsoft-foundry";
|
||||
export const DEFAULT_API = "openai-completions";
|
||||
@@ -111,7 +112,7 @@ type FoundryConfigShape = {
|
||||
};
|
||||
|
||||
export function normalizeFoundryModelName(value?: string | null): string | undefined {
|
||||
const trimmed = typeof value === "string" ? value.trim().toLowerCase() : "";
|
||||
const trimmed = normalizeLowercaseStringOrEmpty(value);
|
||||
return trimmed || undefined;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user