2462d7af29
- move fuzzyMatchModel and transformModelForProvider into model-core - replace connected-providers re-export with adapter contract - route shared wrappers through model-core exports Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
29 lines
921 B
TypeScript
29 lines
921 B
TypeScript
import {
|
|
resolveModel,
|
|
resolveModelWithFallback as resolveModelWithFallbackFromCore,
|
|
normalizeFallbackModels,
|
|
flattenToFallbackModelStrings,
|
|
} from "@oh-my-opencode/model-core"
|
|
import type {
|
|
ModelResolutionInput,
|
|
ExtendedModelResolutionInput,
|
|
} from "@oh-my-opencode/model-core"
|
|
import * as connectedProvidersCache from "./connected-providers-cache"
|
|
|
|
export { resolveModel, normalizeFallbackModels, flattenToFallbackModelStrings }
|
|
|
|
type CoreModelResolutionResult = ReturnType<typeof resolveModelWithFallbackFromCore>
|
|
export type ModelResolutionResult = Exclude<CoreModelResolutionResult, undefined>
|
|
export type ModelSource = ModelResolutionResult["source"]
|
|
|
|
export function resolveModelWithFallback(
|
|
input: ExtendedModelResolutionInput,
|
|
): CoreModelResolutionResult {
|
|
return resolveModelWithFallbackFromCore(input, connectedProvidersCache)
|
|
}
|
|
|
|
export type {
|
|
ModelResolutionInput,
|
|
ExtendedModelResolutionInput,
|
|
}
|