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:
weishu
2026-07-27 12:58:22 +08:00
committed by GitHub
parent da6f4cc5b0
commit 54bddd9db1
8 changed files with 4 additions and 76 deletions
-6
View File
@@ -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`