feat: load provider/model specified inside the recipe config (#6884)

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
Co-authored-by: Zane Staggs <zane@squareup.com>
This commit is contained in:
Abhijay Jain
2026-02-12 02:56:00 +05:30
committed by GitHub
parent 030cea68fa
commit cfa2778b4d
6 changed files with 56 additions and 52 deletions
+2 -1
View File
@@ -1577,7 +1577,8 @@ impl Agent {
None => {
let model_name = config
.get_goose_model()
.map_err(|_| anyhow!("Could not configure agent: missing model"))?;
.ok()
.ok_or_else(|| anyhow!("Could not configure agent: missing model"))?;
crate::model::ModelConfig::new(&model_name)
.map_err(|e| anyhow!("Could not configure agent: invalid model {}", e))?
}