@@ -35,8 +35,12 @@ pub struct ResolvedPersona {
3535
3636 // → Config.model (plain model ID, post-split)
3737 pub model : Option < String > ,
38- // → PersonaRecord.provider (for desktop display / GOOSE_PROVIDER env)
39- pub provider : Option < String > ,
38+ /// LLM inference provider extracted from the model string colon prefix (e.g., 'databricks'
39+ /// from 'databricks:model-id'). Flows into harness-specific env vars (GOOSE_PROVIDER) only.
40+ pub llm_provider : Option < String > ,
41+ /// Preferred ACP runtime ID from the persona config (e.g., 'goose', 'claude'). Maps to
42+ /// PersonaRecord.runtime during pack import.
43+ pub runtime : Option < String > ,
4044 pub temperature : Option < f64 > ,
4145 pub max_context_tokens : Option < u64 > ,
4246
@@ -200,7 +204,7 @@ fn resolve_one_persona(
200204 let system_prompt = compose_prompt ( & lp. prompt , pack_instructions) ;
201205
202206 // Split "provider:model-id" into separate fields (V3 contract).
203- let ( provider , model) = match lp. model . as_deref ( ) {
207+ let ( llm_provider , model) = match lp. model . as_deref ( ) {
204208 Some ( s) if !s. trim ( ) . is_empty ( ) => {
205209 let ( prov, id) = split_model ( s) ;
206210 (
@@ -231,7 +235,8 @@ fn resolve_one_persona(
231235 version,
232236 system_prompt,
233237 model,
234- provider,
238+ llm_provider,
239+ runtime : lp. runtime . clone ( ) ,
235240 temperature : lp. temperature ,
236241 max_context_tokens : lp. max_context_tokens ,
237242 subscribe : lp. subscribe . clone ( ) ,
@@ -642,7 +647,7 @@ mod tests {
642647 assert_eq ! ( p. name, "bot" ) ;
643648 assert_eq ! ( p. system_prompt, "You are Bot.\n " ) ;
644649 assert ! ( p. model. is_none( ) ) ;
645- assert ! ( p. provider . is_none( ) ) ;
650+ assert ! ( p. llm_provider . is_none( ) ) ;
646651 assert ! ( p. triggers. mentions) ; // built-in default
647652 assert ! ( p. mcp_servers. is_empty( ) ) ;
648653 assert ! ( p. goose_env_vars. is_empty( ) ) ;
@@ -685,7 +690,7 @@ mod tests {
685690
686691 // Model split into separate fields (V3 contract)
687692 assert_eq ! ( p. model. as_deref( ) , Some ( "claude-sonnet-4-20250514" ) ) ;
688- assert_eq ! ( p. provider . as_deref( ) , Some ( "anthropic" ) ) ;
693+ assert_eq ! ( p. llm_provider . as_deref( ) , Some ( "anthropic" ) ) ;
689694
690695 // Env vars projected
691696 let env_map: HashMap < & str , & str > = p
@@ -740,10 +745,10 @@ mod tests {
740745
741746 // pip overrides model
742747 assert_eq ! ( pip. model. as_deref( ) , Some ( "claude-4-opus-20250514" ) ) ;
743- assert_eq ! ( pip. provider . as_deref( ) , Some ( "anthropic" ) ) ;
748+ assert_eq ! ( pip. llm_provider . as_deref( ) , Some ( "anthropic" ) ) ;
744749 // lep inherits model from defaults
745750 assert_eq ! ( lep. model. as_deref( ) , Some ( "claude-sonnet-4-20250514" ) ) ;
746- assert_eq ! ( lep. provider . as_deref( ) , Some ( "anthropic" ) ) ;
751+ assert_eq ! ( lep. llm_provider . as_deref( ) , Some ( "anthropic" ) ) ;
747752
748753 // pip inherits temperature from defaults
749754 assert_eq ! ( pip. temperature, Some ( 0.7 ) ) ;
@@ -835,7 +840,7 @@ mod tests {
835840 let pack = resolve_pack ( dir) . unwrap ( ) ;
836841 let p = & pack. personas [ 0 ] ;
837842 assert_eq ! ( p. model. as_deref( ) , Some ( "gpt-4o" ) ) ;
838- assert_eq ! ( p. provider . as_deref( ) , Some ( "openai" ) ) ;
843+ assert_eq ! ( p. llm_provider . as_deref( ) , Some ( "openai" ) ) ;
839844 }
840845
841846 #[ test]
@@ -859,7 +864,7 @@ mod tests {
859864 let pack = resolve_pack ( dir) . unwrap ( ) ;
860865 let p = & pack. personas [ 0 ] ;
861866 assert_eq ! ( p. model. as_deref( ) , Some ( "gpt-4o" ) ) ;
862- assert ! ( p. provider . is_none( ) ) ;
867+ assert ! ( p. llm_provider . is_none( ) ) ;
863868 }
864869
865870 // ── Test helpers ──────────────────────────────────────────────────────
@@ -876,6 +881,7 @@ mod tests {
876881 description : "A test persona." . into ( ) ,
877882 avatar : None ,
878883 model : model. map ( str:: to_owned) ,
884+ runtime : None ,
879885 temperature,
880886 max_context_tokens,
881887 subscribe : vec ! [ ] ,
0 commit comments