mirror of
https://github.com/wu736139669/hapi.git
synced 2026-10-11 19:50:05 +00:00
unify model selection
This commit is contained in:
+4
-1
@@ -18,13 +18,15 @@ export class ApiClient {
|
||||
tag: string
|
||||
metadata: Metadata
|
||||
state: AgentState | null
|
||||
model?: string
|
||||
}): Promise<Session> {
|
||||
const response = await axios.post<CreateSessionResponse>(
|
||||
`${configuration.apiUrl}/cli/sessions`,
|
||||
{
|
||||
tag: opts.tag,
|
||||
metadata: opts.metadata,
|
||||
agentState: opts.state
|
||||
agentState: opts.state,
|
||||
model: opts.model
|
||||
},
|
||||
{
|
||||
headers: {
|
||||
@@ -69,6 +71,7 @@ export class ApiClient {
|
||||
thinking: raw.thinking,
|
||||
thinkingAt: raw.thinkingAt,
|
||||
todos: raw.todos,
|
||||
model: raw.model,
|
||||
permissionMode: raw.permissionMode,
|
||||
modelMode: raw.modelMode
|
||||
}
|
||||
|
||||
@@ -96,6 +96,7 @@ export const CreateSessionResponseSchema = z.object({
|
||||
thinking: z.boolean(),
|
||||
thinkingAt: z.number(),
|
||||
todos: TodosSchema.optional(),
|
||||
model: z.string().optional(),
|
||||
permissionMode: PermissionModeSchema.optional(),
|
||||
modelMode: ModelModeSchema.optional()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user