mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
feat(gemini): support mid-session model change (#379)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { spawn, type ChildProcessWithoutNullStreams } from 'node:child_process';
|
||||
import { logger } from '@/ui/logger';
|
||||
import { killProcessByChildProcess } from '@/utils/process';
|
||||
import { GEMINI_MODEL_PRESETS } from '@hapi/protocol';
|
||||
|
||||
interface JsonRpcRequest {
|
||||
jsonrpc: '2.0';
|
||||
@@ -303,7 +304,7 @@ export class AcpStdioTransport {
|
||||
if (lowerText.includes('status 404') || lowerText.includes('model not found') || lowerText.includes('not_found')) {
|
||||
this.stderrErrorHandler({
|
||||
type: 'model_not_found',
|
||||
message: 'Model not found. Available models: gemini-3.1-pro-preview, gemini-3-flash-preview, gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite',
|
||||
message: `Model not found. Available models: ${GEMINI_MODEL_PRESETS.join(', ')}`,
|
||||
raw: text
|
||||
});
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user