diff --git a/README.md b/README.md index 3a445a5..8a5033a 100644 --- a/README.md +++ b/README.md @@ -96,9 +96,15 @@ Follow our [Platform quickstart](https://docs.minitap.ai/mobile-use-sdk/platform Available models: `MiniMax-M2.7` (200K context, recommended), `MiniMax-M2.7-highspeed` (200K context, faster inference). - > [!NOTE] - > If you want to use Anthropic Claude, set `ANTHROPIC_API_KEY` in your `.env`. - > + **Using Anthropic Claude:** + + [Anthropic](https://www.anthropic.com/) provides Claude — a capable, safety-focused model family. To use it: + + 1. Set `ANTHROPIC_API_KEY` in your `.env` + 2. Copy the contents of the `anthropic` preset object from `llm-config.defaults.jsonc` into your `llm-config.override.jsonc`, or set `"provider": "anthropic"` on individual agent nodes. + + Available models: `claude-sonnet-4-6` (200K context, recommended), `claude-haiku-4-5-20251001` (200K context, faster/cheaper). + > [!NOTE] > If you want to use Google Vertex AI, you must either: > diff --git a/llm-config.defaults.jsonc b/llm-config.defaults.jsonc index 2f6987e..442aedf 100644 --- a/llm-config.defaults.jsonc +++ b/llm-config.defaults.jsonc @@ -71,6 +71,68 @@ // } } }, + // Anthropic preset – uses Claude Sonnet 4.6 (capable, 200k context) with Haiku 4.5 as a + // fast/cheap fallback. To use it, copy the contents of this object into llm-config.override.jsonc. + "anthropic": { + "planner": { + "provider": "anthropic", + "model": "claude-sonnet-4-6", + "fallback": { + "provider": "anthropic", + "model": "claude-haiku-4-5-20251001" + } + }, + "orchestrator": { + "provider": "anthropic", + "model": "claude-sonnet-4-6", + "fallback": { + "provider": "anthropic", + "model": "claude-haiku-4-5-20251001" + } + }, + "cortex": { + "provider": "anthropic", + "model": "claude-sonnet-4-6", + "fallback": { + "provider": "anthropic", + "model": "claude-haiku-4-5-20251001" + } + }, + "executor": { + "provider": "anthropic", + "model": "claude-haiku-4-5-20251001", + "fallback": { + "provider": "anthropic", + "model": "claude-sonnet-4-6" + } + }, + "contextor": { + "provider": "anthropic", + "model": "claude-haiku-4-5-20251001", + "fallback": { + "provider": "anthropic", + "model": "claude-sonnet-4-6" + } + }, + "utils": { + "hopper": { + "provider": "anthropic", + "model": "claude-sonnet-4-6", + "fallback": { + "provider": "anthropic", + "model": "claude-haiku-4-5-20251001" + } + }, + "outputter": { + "provider": "anthropic", + "model": "claude-haiku-4-5-20251001", + "fallback": { + "provider": "anthropic", + "model": "claude-sonnet-4-6" + } + } + } + }, // MiniMax preset – uses MiniMax M2.7 and M2.7-highspeed (200k context). // To use it, copy the contents of this object into llm-config.override.jsonc. "minimax": { diff --git a/minitap/mobile_use/services/llm.py b/minitap/mobile_use/services/llm.py index 735f6a8..900bf60 100644 --- a/minitap/mobile_use/services/llm.py +++ b/minitap/mobile_use/services/llm.py @@ -145,6 +145,7 @@ def get_anthropic_llm( model_name=model_name, api_key=settings.ANTHROPIC_API_KEY, temperature=temperature, + max_tokens=8192, # type: ignore[call-arg] # field aliased to max_tokens_to_sample max_retries=2, timeout=None, stop=None,