When using Nous Portal (or any non-OpenRouter provider), child agents spawned by delegate_task failed with "No pricing available" or "Unknown model" errors because they had no valid API key. The delegate tool passed base_url but not api_key to child AIAgent instances. Without an explicit key, children fell back to the empty OPENROUTER_API_KEY env var, causing auth failures. Extract the parent's API key from _client_kwargs and pass it through. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
17 KiB
17 KiB