From 0ffa6d04b597413118a869b6af9b0293ac47f143 Mon Sep 17 00:00:00 2001 From: Robert Brennan Date: Tue, 29 Oct 2024 12:37:14 -0400 Subject: [PATCH 1/3] chance default model to 3.5 sonnet new --- frontend/src/services/settings.ts | 2 +- frontend/src/utils/verified-models.ts | 1 + openhands/agenthub/browsing_agent/README.md | 2 +- openhands/core/config/llm_config.py | 2 +- openhands/runtime/plugins/agent_skills/utils/config.py | 2 +- openhands/server/README.md | 4 ++-- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/frontend/src/services/settings.ts b/frontend/src/services/settings.ts index 0e0a2f20da9..213a80e2feb 100644 --- a/frontend/src/services/settings.ts +++ b/frontend/src/services/settings.ts @@ -11,7 +11,7 @@ export type Settings = { }; export const DEFAULT_SETTINGS: Settings = { - LLM_MODEL: "openai/gpt-4o", + LLM_MODEL: "claude-3-5-sonnet-20241022", LLM_BASE_URL: "", AGENT: "CodeActAgent", LANGUAGE: "en", diff --git a/frontend/src/utils/verified-models.ts b/frontend/src/utils/verified-models.ts index 555de8acfaf..432a5439121 100644 --- a/frontend/src/utils/verified-models.ts +++ b/frontend/src/utils/verified-models.ts @@ -19,6 +19,7 @@ export const VERIFIED_OPENAI_MODELS = [ export const VERIFIED_ANTHROPIC_MODELS = [ "claude-2", "claude-2.1", + "claude-3-5-sonnet-20241022", "claude-3-5-sonnet-20240620", "claude-3-haiku-20240307", "claude-3-opus-20240229", diff --git a/openhands/agenthub/browsing_agent/README.md b/openhands/agenthub/browsing_agent/README.md index 9f8ca36277f..f1342121594 100644 --- a/openhands/agenthub/browsing_agent/README.md +++ b/openhands/agenthub/browsing_agent/README.md @@ -12,5 +12,5 @@ poetry run python ./openhands/core/main.py \ -i 10 \ -t "tell me the usa's president using google search" \ -c BrowsingAgent \ - -m gpt-4o-2024-05-13 + -m claude-3-5-sonnet-20241022 ``` diff --git a/openhands/core/config/llm_config.py b/openhands/core/config/llm_config.py index 7ad6476d7c1..2bcc0bd3915 100644 --- a/openhands/core/config/llm_config.py +++ b/openhands/core/config/llm_config.py @@ -45,7 +45,7 @@ class LLMConfig: supports_function_calling: Whether the model supports function calling. """ - model: str = 'gpt-4o' + model: str = 'claude-3-5-sonnet-20241022' api_key: str | None = None base_url: str | None = None api_version: str | None = None diff --git a/openhands/runtime/plugins/agent_skills/utils/config.py b/openhands/runtime/plugins/agent_skills/utils/config.py index f0084c54039..f92aeb1f334 100644 --- a/openhands/runtime/plugins/agent_skills/utils/config.py +++ b/openhands/runtime/plugins/agent_skills/utils/config.py @@ -18,7 +18,7 @@ def _get_openai_base_url(): def _get_openai_model(): - return os.getenv('OPENAI_MODEL', 'gpt-4o') + return os.getenv('OPENAI_MODEL', 'claude-3-5-sonnet-20241022') def _get_max_token(): diff --git a/openhands/server/README.md b/openhands/server/README.md index b2ed7e7aa40..c2f104f0405 100644 --- a/openhands/server/README.md +++ b/openhands/server/README.md @@ -40,8 +40,8 @@ websocat ws://127.0.0.1:3000/ws ## Supported Environment Variables ```sh -LLM_API_KEY=sk-... # Your OpenAI API Key -LLM_MODEL=gpt-4o # Default model for the agent to use +LLM_API_KEY=sk-... # Your Anthropic API Key +LLM_MODEL=claude-3-5-sonnet-20241022 # Default model for the agent to use WORKSPACE_BASE=/path/to/your/workspace # Default absolute path to workspace ``` From 79a7ea6b7aa81c1a5dd9563f8d4c525b62662276 Mon Sep 17 00:00:00 2001 From: Robert Brennan Date: Tue, 29 Oct 2024 12:48:05 -0400 Subject: [PATCH 2/3] Update openhands/runtime/plugins/agent_skills/utils/config.py Co-authored-by: Xingyao Wang --- openhands/runtime/plugins/agent_skills/utils/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openhands/runtime/plugins/agent_skills/utils/config.py b/openhands/runtime/plugins/agent_skills/utils/config.py index f92aeb1f334..f0084c54039 100644 --- a/openhands/runtime/plugins/agent_skills/utils/config.py +++ b/openhands/runtime/plugins/agent_skills/utils/config.py @@ -18,7 +18,7 @@ def _get_openai_base_url(): def _get_openai_model(): - return os.getenv('OPENAI_MODEL', 'claude-3-5-sonnet-20241022') + return os.getenv('OPENAI_MODEL', 'gpt-4o') def _get_max_token(): From faf8e958369fdff566cc3ebb355f23922d26e08b Mon Sep 17 00:00:00 2001 From: Robert Brennan Date: Tue, 29 Oct 2024 13:05:36 -0400 Subject: [PATCH 3/3] Update frontend/src/services/settings.ts Co-authored-by: Xingyao Wang --- frontend/src/services/settings.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/services/settings.ts b/frontend/src/services/settings.ts index 213a80e2feb..63efaedc7a5 100644 --- a/frontend/src/services/settings.ts +++ b/frontend/src/services/settings.ts @@ -11,7 +11,7 @@ export type Settings = { }; export const DEFAULT_SETTINGS: Settings = { - LLM_MODEL: "claude-3-5-sonnet-20241022", + LLM_MODEL: "anthropic/claude-3-5-sonnet-20241022", LLM_BASE_URL: "", AGENT: "CodeActAgent", LANGUAGE: "en",