feat(ai): support custom reasoning fields (#38227)

This commit is contained in:
Aiden Cline 2026-07-21 23:42:59 -05:00 committed by GitHub
commit 23483ea013
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 306 additions and 67 deletions

View file

@ -1,11 +1,14 @@
import type { ModelInfo, ProviderV2Info } from "@opencode-ai/sdk/v2/types"
import type { CatalogApi } from "@opencode-ai/client/effect/api"
import type { Model } from "@opencode-ai/schema/model"
import type { Effect } from "effect"
import type { Transform } from "./registration.js"
type CatalogModel = ModelInfo & { compatibility?: Model.Compatibility }
export interface CatalogProviderRecord {
readonly provider: ProviderV2Info
readonly models: ReadonlyMap<string, ModelInfo>
readonly models: ReadonlyMap<string, CatalogModel>
}
export interface CatalogDraft {
@ -16,8 +19,8 @@ export interface CatalogDraft {
remove(providerID: string): void
}
readonly model: {
get(providerID: string, modelID: string): ModelInfo | undefined
update(providerID: string, modelID: string, update: (model: ModelInfo) => void): void
get(providerID: string, modelID: string): CatalogModel | undefined
update(providerID: string, modelID: string, update: (model: CatalogModel) => void): void
remove(providerID: string, modelID: string): void
readonly default: {
get(): { providerID: string; modelID: string } | undefined