From f0f26086469b7c4b1fcbb4cc97388efd399a27c3 Mon Sep 17 00:00:00 2001 From: Salil Das <11658960+sadlilas@users.noreply.github.com> Date: Sun, 22 Feb 2026 13:49:59 -0800 Subject: [PATCH] feat: add context_budget_cap and context window to provider defaults MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Gemini charges 2x input / 1.5x output above 200k tokens, matching Anthropic's pricing cliff. Add context_budget_cap: 200,000 so context-simple can cap its working budget at the cost-optimal threshold. Also adds context_window (1,048,576) and max_output_tokens (65,536) to ProviderInfo.defaults -- these were missing, causing context-simple to fall through to its 200k fallback instead of calculating a dynamic budget from the actual model limits. Related: microsoft-amplifier/amplifier-support#57 🤖 Generated with [Amplifier](https://github.com/microsoft/amplifier) Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com> --- amplifier_module_provider_gemini/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/amplifier_module_provider_gemini/__init__.py b/amplifier_module_provider_gemini/__init__.py index 479285c..2e149cc 100644 --- a/amplifier_module_provider_gemini/__init__.py +++ b/amplifier_module_provider_gemini/__init__.py @@ -200,6 +200,10 @@ def get_info(self) -> ProviderInfo: "max_tokens": 8192, "temperature": 0.7, "timeout": 600.0, + "context_window": 1_048_576, + "max_output_tokens": 65_536, + # Gemini charges 2x input / 1.5x output above 200k tokens + "context_budget_cap": 200_000, }, config_fields=[ ConfigField(