From 28ea31b0738fa3479ab3b71e1a686a14dd47147c Mon Sep 17 00:00:00 2001 From: Evan Date: Tue, 21 Apr 2026 20:10:09 +0900 Subject: [PATCH] chore(agents): drop GEMINI_API_KEY fallback from generic templates (#68) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These 11 templates are the general-purpose ones that don't depend on any particular model at the primary level (`[model] provider = "default"`). They also ship a secondary `[[fallback_models]]` block pointing at `gemini-2.0-flash` with `api_key_env = "GEMINI_API_KEY"`. That default hurts everyone who doesn't happen to have `$GEMINI_API_KEY` set — every agent boot logs `WARN Fallback driver 'gemini' failed to init: Missing API key`, once per turn per agent. The templates that actually intend to use Gemini as their primary model (analyst, coder, researcher, code-reviewer, debugger, legal-assistant, data-scientist, academic-researcher, test-engineer) are left untouched — those declare Gemini in `[model]`, which is an intentional design choice, not a hidden fallback. Users who want a Gemini fallback chain for generic agents can add `[[fallback_models]]` themselves in `~/.librefang/workspaces/agents/...` once they've set `$GEMINI_API_KEY`. Removed from: assistant, customer-support, devops-lead, doc-writer, email-assistant, meeting-assistant, planner, recruiter, sales-assistant, social-media, writer --- agents/assistant/agent.toml | 5 ----- agents/customer-support/agent.toml | 5 ----- agents/devops-lead/agent.toml | 5 ----- agents/doc-writer/agent.toml | 5 ----- agents/email-assistant/agent.toml | 5 ----- agents/meeting-assistant/agent.toml | 5 ----- agents/planner/agent.toml | 5 ----- agents/recruiter/agent.toml | 5 ----- agents/sales-assistant/agent.toml | 5 ----- agents/social-media/agent.toml | 5 ----- agents/writer/agent.toml | 5 ----- 11 files changed, 55 deletions(-) diff --git a/agents/assistant/agent.toml b/agents/assistant/agent.toml index 0b7521d..63a9939 100644 --- a/agents/assistant/agent.toml +++ b/agents/assistant/agent.toml @@ -77,11 +77,6 @@ TOOLS AVAILABLE: You are reliable, adaptable, and genuinely helpful. You are the user's trusted first point of contact in the LibreFang Agent OS — capable of handling most tasks directly and smart enough to delegate when a specialist would do it better.""" -[[fallback_models]] -provider = "default" -model = "gemini-2.0-flash" -api_key_env = "GEMINI_API_KEY" - [resources] max_llm_tokens_per_hour = 300000 max_concurrent_tools = 10 diff --git a/agents/customer-support/agent.toml b/agents/customer-support/agent.toml index 58b9032..47beab0 100644 --- a/agents/customer-support/agent.toml +++ b/agents/customer-support/agent.toml @@ -71,11 +71,6 @@ TOOLS AVAILABLE: You are patient, empathetic, and solutions-focused. You turn frustrated customers into satisfied advocates.""" -[[fallback_models]] -provider = "default" -model = "gemini-2.0-flash" -api_key_env = "GEMINI_API_KEY" - [resources] max_llm_tokens_per_hour = 200000 max_concurrent_tools = 5 diff --git a/agents/devops-lead/agent.toml b/agents/devops-lead/agent.toml index 87a07e9..30af95c 100644 --- a/agents/devops-lead/agent.toml +++ b/agents/devops-lead/agent.toml @@ -43,11 +43,6 @@ When designing pipelines: 4. Blue-green or canary deployments 5. Automated rollback on failure""" -[[fallback_models]] -provider = "default" -model = "gemini-2.0-flash" -api_key_env = "GEMINI_API_KEY" - [resources] max_llm_tokens_per_hour = 150000 diff --git a/agents/doc-writer/agent.toml b/agents/doc-writer/agent.toml index c08a02e..0a32998 100644 --- a/agents/doc-writer/agent.toml +++ b/agents/doc-writer/agent.toml @@ -42,11 +42,6 @@ Style guide: - Code examples for every non-trivial concept - Consistent formatting and structure""" -[[fallback_models]] -provider = "default" -model = "gemini-2.0-flash" -api_key_env = "GEMINI_API_KEY" - [resources] max_llm_tokens_per_hour = 200000 diff --git a/agents/email-assistant/agent.toml b/agents/email-assistant/agent.toml index b108da1..c88d8ed 100644 --- a/agents/email-assistant/agent.toml +++ b/agents/email-assistant/agent.toml @@ -63,11 +63,6 @@ TOOLS AVAILABLE: You are thorough, discreet, and efficient. You treat every email as an opportunity to communicate clearly and build professional relationships.""" -[[fallback_models]] -provider = "default" -model = "gemini-2.0-flash" -api_key_env = "GEMINI_API_KEY" - [resources] max_llm_tokens_per_hour = 150000 max_concurrent_tools = 5 diff --git a/agents/meeting-assistant/agent.toml b/agents/meeting-assistant/agent.toml index fd70f73..03eada2 100644 --- a/agents/meeting-assistant/agent.toml +++ b/agents/meeting-assistant/agent.toml @@ -66,11 +66,6 @@ TOOLS AVAILABLE: You are organized, detail-oriented, and relentlessly focused on accountability. You turn chaotic meetings into clear outcomes.""" -[[fallback_models]] -provider = "default" -model = "gemini-2.0-flash" -api_key_env = "GEMINI_API_KEY" - [resources] max_llm_tokens_per_hour = 150000 max_concurrent_tools = 5 diff --git a/agents/planner/agent.toml b/agents/planner/agent.toml index 7489105..9d40ae2 100644 --- a/agents/planner/agent.toml +++ b/agents/planner/agent.toml @@ -46,11 +46,6 @@ Output format: ### Milestones & Timeline ### Open Questions""" -[[fallback_models]] -provider = "default" -model = "gemini-2.0-flash" -api_key_env = "GEMINI_API_KEY" - [resources] max_llm_tokens_per_hour = 200000 diff --git a/agents/recruiter/agent.toml b/agents/recruiter/agent.toml index af377fd..2f1c829 100644 --- a/agents/recruiter/agent.toml +++ b/agents/recruiter/agent.toml @@ -64,11 +64,6 @@ TOOLS AVAILABLE: You are thorough, fair, and people-oriented. You help organizations find the right talent through ethical, efficient, and human-centered recruiting practices.""" -[[fallback_models]] -provider = "default" -model = "gemini-2.0-flash" -api_key_env = "GEMINI_API_KEY" - [resources] max_llm_tokens_per_hour = 150000 max_concurrent_tools = 5 diff --git a/agents/sales-assistant/agent.toml b/agents/sales-assistant/agent.toml index 10743ae..d48ddc8 100644 --- a/agents/sales-assistant/agent.toml +++ b/agents/sales-assistant/agent.toml @@ -57,11 +57,6 @@ TOOLS AVAILABLE: You are strategic, persuasive, and detail-oriented. You help sales teams work smarter and close more deals.""" -[[fallback_models]] -provider = "default" -model = "gemini-2.0-flash" -api_key_env = "GEMINI_API_KEY" - [resources] max_llm_tokens_per_hour = 150000 max_concurrent_tools = 5 diff --git a/agents/social-media/agent.toml b/agents/social-media/agent.toml index 77dc490..fecbe53 100644 --- a/agents/social-media/agent.toml +++ b/agents/social-media/agent.toml @@ -66,11 +66,6 @@ TOOLS AVAILABLE: You are creative, culturally aware, and strategically minded. You balance creativity with data-driven decision-making.""" -[[fallback_models]] -provider = "default" -model = "gemini-2.0-flash" -api_key_env = "GEMINI_API_KEY" - [resources] max_llm_tokens_per_hour = 120000 max_concurrent_tools = 5 diff --git a/agents/writer/agent.toml b/agents/writer/agent.toml index bddd008..9e20fa0 100644 --- a/agents/writer/agent.toml +++ b/agents/writer/agent.toml @@ -39,11 +39,6 @@ OUTPUT: - For short content (emails, messages, summaries), respond directly. - Adapt formatting to the target platform when specified.""" -[[fallback_models]] -provider = "default" -model = "gemini-2.0-flash" -api_key_env = "GEMINI_API_KEY" - [resources] max_llm_tokens_per_hour = 100000