From 4d5b584e39cf90a4afaab8af46be2f69dcd914b6 Mon Sep 17 00:00:00 2001 From: salmonik Date: Thu, 19 Nov 2026 11:30:47 +0100 Subject: 0.12.0: provider is a type + URL, plus a config file - --provider opencode|openai-compatible; opencode keeps the session header, openai-compatible needs a base URL and sends none - config file at ~/.config/agent686/config.toml (provider, url, model, flags) - fix the doubled-dash --provider help message --- tests/loop.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'tests/loop.rs') diff --git a/tests/loop.rs b/tests/loop.rs index 8c913cd..7e6086f 100644 --- a/tests/loop.rs +++ b/tests/loop.rs @@ -101,6 +101,9 @@ fn runs_a_tool_call_then_finishes_and_records_every_message() { yolo: true, lenient: false, system_ca: false, + provider: agent686::config::Provider::OpenCode, + allow_home: false, + allow_nogit: false, }; let mut history = agent::new_history(system); let mut approver = Approver::new(true); @@ -174,6 +177,9 @@ fn a_denied_tool_call_is_returned_as_data() { yolo: false, lenient: false, system_ca: false, + provider: agent686::config::Provider::OpenCode, + allow_home: false, + allow_nogit: false, }; let mut history = agent::new_history(system); // Not a terminal, so the approver must deny rather than block. @@ -244,6 +250,9 @@ fn aborting_between_tool_calls_answers_every_call() { yolo: true, lenient: false, system_ca: false, + provider: agent686::config::Provider::OpenCode, + allow_home: false, + allow_nogit: false, }; let mut history = agent::new_history(system); let mut approver = Approver::new(true); @@ -321,6 +330,9 @@ fn opening_a_session_with_unanswered_calls_repairs_it() { yolo: true, lenient: false, system_ca: false, + provider: agent686::config::Provider::OpenCode, + allow_home: false, + allow_nogit: false, }; let mut approver = Approver::new(true); agent::run_turn( @@ -377,6 +389,9 @@ fn an_empty_bash_call_is_never_approved() { yolo: false, lenient: false, system_ca: false, + provider: agent686::config::Provider::OpenCode, + allow_home: false, + allow_nogit: false, }; let mut history = agent::new_history(system); // Not a terminal: if this reaches the approval path it is denied, which the @@ -433,6 +448,9 @@ fn a_tool_call_with_no_arguments_is_reported_to_the_model() { yolo: false, lenient: false, system_ca: false, + provider: agent686::config::Provider::OpenCode, + allow_home: false, + allow_nogit: false, }; let mut history = agent::new_history(system); let mut approver = Approver::new(false); @@ -489,6 +507,9 @@ fn a_wrong_argument_key_names_both_keys() { yolo: false, lenient: false, system_ca: false, + provider: agent686::config::Provider::OpenCode, + allow_home: false, + allow_nogit: false, }; let mut history = agent::new_history(system); let mut approver = Approver::new(false); -- cgit v1.2.3