CubeLoop — a Pythonic, async-native agent harness core designed for high performance, readability, and production-grade persistence.
Python agent-frameworkagent-harnessagent-runtimeagentic-aiai-agentsai-frameworkanthropicharnessharness-engineeringharness-frameworklanggraphlanggraph-alternativellmmcpopenaipi-agentpi-agent-corepythonpython-agent
feat(anthropic): accept base_url for OpenAI-compat proxies
xf gongc82a318ee1b3
diff --git a/cubepi/providers/anthropic.py b/cubepi/providers/anthropic.pyindex 68ce6c8..4f3bb14 100644--- a/cubepi/providers/anthropic.py+++ b/cubepi/providers/anthropic.py@@ -62,12 +62,16 @@ class AnthropicProvider:self,*,api_key: str | None = None,+ base_url: str | None = None,cache_retention: CacheRetention = "short",cache_policy: CacheMarkerPolicy | None = None,) -> None:import anthropic- self._client = anthropic.AsyncAnthropic(api_key=api_key)+ kwargs: dict[str, Any] = {"api_key": api_key}+ if base_url is not None:+ kwargs["base_url"] = base_url+ self._client = anthropic.AsyncAnthropic(**kwargs)self._cache_retention = cache_retentionself._cache_policy: CacheMarkerPolicy = (cache_policy or DefaultCacheMarkerPolicy()