Skip to content

Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)

Python

Move Anthropic provider files into anthropic/ subpackage

Claude0fc75105fdee
diff --git a/backend/agent/providers/anthropic/__init__.py b/backend/agent/providers/anthropic/__init__.py
new file mode 100644
index 00000000..a5d7aab4
--- /dev/null
+++ b/backend/agent/providers/anthropic/__init__.py
@@ -0,0 +1,11 @@
+from agent.providers.anthropic.provider import (
+ AnthropicProviderSession,
+ serialize_anthropic_tools,
+ _extract_anthropic_usage,
+)
+
+__all__ = [
+ "AnthropicProviderSession",
+ "serialize_anthropic_tools",
+ "_extract_anthropic_usage",
+]
diff --git a/backend/agent/providers/claude_image.py b/backend/agent/providers/anthropic/image.py
similarity index 100%
rename from backend/agent/providers/claude_image.py
rename to backend/agent/providers/anthropic/image.py
diff --git a/backend/agent/providers/anthropic.py b/backend/agent/providers/anthropic/provider.py
similarity index 99%
rename from backend/agent/providers/anthropic.py
rename to backend/agent/providers/anthropic/provider.py
index 9aa97e10..5780a446 100644
--- a/backend/agent/providers/anthropic.py
+++ b/backend/agent/providers/anthropic/provider.py
@@ -15,7 +15,7 @@ from agent.providers.base import (
ProviderTurn,
StreamEvent,
)
-from agent.providers.claude_image import process_image
+from agent.providers.anthropic.image import process_image
from agent.providers.pricing import MODEL_PRICING
from agent.providers.token_usage import TokenUsage
from agent.tools import CanonicalToolDefinition, ToolCall, parse_json_arguments