mirror of
https://github.com/cexll/myclaude.git
synced 2026-02-04 02:20:42 +08:00
fix(gemini): read GEMINI_MODEL from ~/.gemini/.env (#131)
When using gemini backend without --model flag, now automatically reads GEMINI_MODEL from ~/.gemini/.env file, consistent with how claude backend reads model from settings.
This commit is contained in:
@@ -940,6 +940,11 @@ func RunCodexTaskWithContext(parentCtx context.Context, taskSpec TaskSpec, backe
|
||||
// Load gemini env from ~/.gemini/.env if exists
|
||||
if cfg.Backend == "gemini" {
|
||||
fileEnv = loadGeminiEnv()
|
||||
if cfg.Mode != "resume" && strings.TrimSpace(cfg.Model) == "" {
|
||||
if model := fileEnv["GEMINI_MODEL"]; model != "" {
|
||||
cfg.Model = model
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
useStdin := taskSpec.UseStdin
|
||||
|
||||
Reference in New Issue
Block a user