mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
fix(hub,web): query Codex models via machine RPC instead of session cwd (#1186)
SessionChat fetched Codex models through the session-scoped endpoint, so the CLI listed models in the session process cwd, where a missing directory or project-level Codex config could skew or break the result. Use the machine-scoped endpoint (already used by NewSession) and drop the now-unused session route and RPC plumbing. Fixes #1072
This commit is contained in:
@@ -653,12 +653,6 @@ export class ApiClient {
|
||||
)
|
||||
}
|
||||
|
||||
async getSessionCodexModels(sessionId: string): Promise<CodexModelsResponse> {
|
||||
return await this.request<CodexModelsResponse>(
|
||||
`/api/sessions/${encodeURIComponent(sessionId)}/codex-models`
|
||||
)
|
||||
}
|
||||
|
||||
async getSessionOpencodeModels(sessionId: string): Promise<OpencodeModelsResponse> {
|
||||
return await this.request<OpencodeModelsResponse>(
|
||||
`/api/sessions/${encodeURIComponent(sessionId)}/opencode-models`
|
||||
|
||||
Reference in New Issue
Block a user