kaxil commented on code in PR #71464:
URL: https://github.com/apache/airflow/pull/71464#discussion_r3764870316
##########
providers/anthropic/src/airflow/providers/anthropic/hooks/anthropic.py:
##########
@@ -575,16 +576,21 @@ def wait_for_batch(
# (these helpers, the ``ant`` CLI, or a setup script) and store the IDs.
The
# operator references those IDs; it never creates an agent per run.
- def create_agent(self, name: str, model: str | None = None, **kwargs: Any)
-> BetaManagedAgentsAgent:
+ def create_agent(
+ self, name: str, model: str | dict[str, Any] | None = None, **kwargs:
Any
+ ) -> BetaManagedAgentsAgent:
"""
Create a (reusable, versioned) Managed Agents agent. One-time setup.
``model`` defaults to :attr:`default_model` (the connection's
``extra['model']``
- or :data:`DEFAULT_MODEL`).
+ or :data:`DEFAULT_MODEL`). Pass a mapping instead of a bare id to set
the model
+ config, e.g. ``{"id": "claude-opus-4-8", "inference_geo": "us"}``.
Review Comment:
Applied to the docstring too, so it matches the guide.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]