Add session-level bridge model settings (#811)
This commit is contained in:
@@ -16,6 +16,8 @@ export interface StartRunRequest {
|
||||
instructions?: string
|
||||
session_id?: string
|
||||
model?: string
|
||||
provider?: string
|
||||
model_groups?: Array<{ provider: string; models: string[] }>
|
||||
queue_id?: string
|
||||
source?: 'api_server' | 'cli'
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ export interface ConversationSummary {
|
||||
id: string
|
||||
source: string
|
||||
model: string
|
||||
provider?: string
|
||||
title: string | null
|
||||
started_at: number
|
||||
ended_at: number | null
|
||||
|
||||
@@ -4,6 +4,7 @@ export interface SessionSummary {
|
||||
id: string
|
||||
source: string
|
||||
model: string
|
||||
provider?: string
|
||||
title: string | null
|
||||
preview?: string
|
||||
started_at: number
|
||||
@@ -147,6 +148,18 @@ export async function setSessionWorkspace(id: string, workspace: string | null):
|
||||
}
|
||||
}
|
||||
|
||||
export async function setSessionModel(id: string, model: string, provider: string): Promise<boolean> {
|
||||
try {
|
||||
await request(`/api/hermes/sessions/${id}/model`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ model, provider }),
|
||||
})
|
||||
return true
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
export async function exportSession(id: string, mode: 'full' | 'compressed' = 'full', ext: 'json' | 'txt' = 'json'): Promise<void> {
|
||||
const baseUrl = getBaseUrlValue()
|
||||
const token = getApiKey()
|
||||
|
||||
Reference in New Issue
Block a user