Skip to content

Commit cbab312

Browse files
committed
adding claude-4 and o3
1 parent 35f149b commit cbab312

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/agentlab/llm/chat_api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import anthropic
1010
import openai
1111
from huggingface_hub import InferenceClient
12-
from openai import AzureOpenAI, OpenAI
12+
from openai import NOT_GIVEN, AzureOpenAI, OpenAI
1313

1414
import agentlab.llm.tracking as tracking
1515
from agentlab.llm.base_api import AbstractChatModel, BaseModelArgs
@@ -348,6 +348,8 @@ def __init__(
348348
min_retry_wait_time=60,
349349
log_probs=False,
350350
):
351+
if max_tokens is None:
352+
max_tokens = NOT_GIVEN
351353
super().__init__(
352354
model_name=model_name,
353355
api_key=api_key,

src/agentlab/llm/llm_configs.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
OpenRouterModelArgs,
66
SelfHostedModelArgs,
77
)
8+
from openai import NOT_GIVEN
89

910
default_oss_llms_args = {
1011
"n_retry_server": 4,
@@ -39,6 +40,14 @@
3940
max_new_tokens=100_000,
4041
vision_support=False,
4142
),
43+
"openai/o3-2025-04-16": OpenAIModelArgs(
44+
model_name="o3-2025-04-16",
45+
max_total_tokens=200_000,
46+
max_input_tokens=200_000,
47+
max_new_tokens=None,
48+
temperature=1,
49+
vision_support=True,
50+
),
4251
"openai/gpt-4o-mini-2024-07-18": OpenAIModelArgs(
4352
model_name="gpt-4o-mini-2024-07-18",
4453
max_total_tokens=128_000,
@@ -122,6 +131,11 @@
122131
max_new_tokens=16_384,
123132
temperature=1e-1,
124133
),
134+
"anthropic/claude-sonnet-4-20250514": AnthropicModelArgs(
135+
model_name="claude-sonnet-4-20250514",
136+
max_new_tokens=16_384,
137+
temperature=1e-1,
138+
),
125139
# ---------------- OSS LLMs ----------------#
126140
"meta-llama/Meta-Llama-3-70B-Instruct": SelfHostedModelArgs(
127141
model_name="meta-llama/Meta-Llama-3-70B-Instruct",

0 commit comments

Comments
 (0)