refactor(shared): deduplicate model resolution utility functions
Extract normalizeModel() (3 identical copies) and normalizeModelID() (2 identical copies) into canonical src/shared/model-normalization.ts. Delete dead-end duplicate model-name-matcher.ts. Update all consumers.
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
import type { FallbackEntry } from "../../shared/model-requirements"
|
||||
import { normalizeModel } from "../../shared/model-normalization"
|
||||
import { fuzzyMatchModel } from "../../shared/model-availability"
|
||||
import { transformModelForProvider } from "../../shared/provider-model-id-transform"
|
||||
|
||||
function normalizeModel(model?: string): string | undefined {
|
||||
const trimmed = model?.trim()
|
||||
return trimmed || undefined
|
||||
}
|
||||
|
||||
export function resolveModelForDelegateTask(input: {
|
||||
userModel?: string
|
||||
|
||||
Reference in New Issue
Block a user