refactor(packages): extract model-core package

This commit is contained in:
YeonGyu-Kim
2026-05-21 02:11:37 +09:00
parent f7ceb03efe
commit 2748009ff2
60 changed files with 2155 additions and 1834 deletions
+6 -41
View File
@@ -1,41 +1,6 @@
import type { FallbackEntry } from "./model-requirements"
export interface DelegatedModelConfig {
providerID: string
modelID: string
variant?: string
reasoningEffort?: string
temperature?: number
top_p?: number
maxTokens?: number
thinking?: { type: "enabled" | "disabled"; budgetTokens?: number }
}
export type ModelResolutionRequest = {
intent?: {
uiSelectedModel?: string
userModel?: string
categoryDefaultModel?: string
}
constraints: {
availableModels: Set<string>
}
policy?: {
fallbackChain?: FallbackEntry[]
systemDefaultModel?: string
}
}
export type ModelResolutionProvenance =
| "override"
| "category-default"
| "provider-fallback"
| "system-default"
export type ModelResolutionResult = {
model: string
provenance: ModelResolutionProvenance
variant?: string
attempted?: string[]
reason?: string
}
export type {
DelegatedModelConfig,
ModelResolutionRequest,
ModelResolutionProvenance,
ModelResolutionResult,
} from "@oh-my-opencode/model-core"