feat: expose the current coyote model to tools
This commit is contained in:
2 files changed
+6
-1
No files matched your search
@@ -944,6 +944,8 @@ fn build_env_snapshot(
|
||||
envs.insert("LLM_OUTPUT".into(), output_file.display().to_string());
|
||||
envs.insert("CLICOLOR_FORCE".into(), "1".into());
|
||||
envs.insert("FORCE_COLOR".into(), "1".into());
|
||||
envs.entry("COYOTE_CURRENT_MODEL".to_string())
|
||||
.or_insert_with(|| ctx.current_model().id());
|
||||
|
||||
cmd_args.push(arguments.to_string());
|
||||
|
||||
|
||||
+4
-1
@@ -1544,11 +1544,14 @@ impl ToolCall {
|
||||
let current_depth = ctx.current_depth;
|
||||
let quiet = current_depth > 0;
|
||||
let agent_name = agent.as_ref().map(|agent| agent.name().to_owned());
|
||||
let (call_name, cmd_name, mut cmd_args, envs) = match agent.as_ref() {
|
||||
let (call_name, cmd_name, mut cmd_args, mut envs) = match agent.as_ref() {
|
||||
Some(agent) => self.extract_call_config_from_agent(&functions, agent)?,
|
||||
None => self.extract_call_config_from_ctx(&functions)?,
|
||||
};
|
||||
|
||||
envs.entry("COYOTE_CURRENT_MODEL".to_string())
|
||||
.or_insert_with(|| ctx.current_model().id());
|
||||
|
||||
let json_data = if self.arguments.is_object() {
|
||||
self.arguments.clone()
|
||||
} else if let Some(arguments) = self.arguments.as_str() {
|
||||
|
||||
Reference in new issue
Block a user