mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-18 03:27:08 +00:00
fix(opencode): expose model-specific reasoning effort options (#1716)
* fix(cli): discover opencode thought_level via set_config_option on model switch * fix(cli): apply and refresh opencode model switches so thought_level stays discoverable * fix(web): track opencode effort options across model switches * feat(cli,hub,web): dynamic opencode effort options in new-session form * test(cli): avoid platform-specific process event narrowing * fix(opencode): address variant discovery review findings * fix(opencode): synchronize effort options with model targets * fix(opencode): roll back rejected model targets * fix(cli): guard opencode variant probe workspace paths * fix(web): clear stale opencode effort on model switch * fix(cli): clear stale opencode effort metadata * fix(web): reset stale effort options on model switch * fix(web): reset opencode effort poll budget * test(web): enforce opencode effort poll budget
This commit is contained in:
@@ -782,6 +782,13 @@ export type OpencodeModelsResponse = {
|
||||
|
||||
export type ListOpencodeModelsResponse = OpencodeModelsResponse
|
||||
|
||||
/** Variant values keyed by `providerId/modelId` from the OpenCode server catalog. */
|
||||
export type OpencodeModelVariantsResponse = {
|
||||
success: boolean
|
||||
variants?: Record<string, string[]>
|
||||
error?: string
|
||||
}
|
||||
|
||||
export type GrokModelSummary = {
|
||||
modelId: string
|
||||
name?: string
|
||||
@@ -833,6 +840,10 @@ export type OpencodeReasoningEffortResponse = {
|
||||
success: boolean
|
||||
options?: OpencodeReasoningEffortOption[]
|
||||
currentValue?: string | null
|
||||
/** Backend-side model the options belong to — lets clients detect a pending model switch. */
|
||||
currentModelId?: string | null
|
||||
/** Concrete backend model requested by the session, including a resolved Default selection. */
|
||||
targetModelId?: string | null
|
||||
error?: string
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ export const RPC_METHODS = {
|
||||
ListPiModels: 'listPiModels',
|
||||
ListPiSessions: 'listPiSessions',
|
||||
ListOpencodeModels: 'listOpencodeModels',
|
||||
ListOpencodeModelVariants: 'listOpencodeModelVariants',
|
||||
ListOpencodeModelsForCwd: 'listOpencodeModelsForCwd',
|
||||
ListGrokModelsForCwd: 'listGrokModelsForCwd',
|
||||
ListGrokModels: 'listGrokModels',
|
||||
|
||||
Reference in New Issue
Block a user