Skip to content

feat: added o4-mini support #221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ async def async_stream():
return latencies

def build_chat_request(model: str, chat_input: str, is_stream: bool, max_tokens: int=1000):
if model.startswith(('o1', 'o3')):
if model.startswith(('o1', 'o3', 'o4')):
chat_request = {
"chat_input": chat_input,
"model": model,
Expand Down Expand Up @@ -156,7 +156,7 @@ def multiple_provider_runs(provider:str, model:str, num_runs:int, api_key:str, *
def run_chat_all_providers():
# OpenAI
multiple_provider_runs(provider="openai", model="gpt-4o-mini", api_key=os.environ["OPENAI_API_KEY"], num_runs=1)
multiple_provider_runs(provider="openai", model="o3-mini", api_key=os.environ["OPENAI_API_KEY"], num_runs=1)
multiple_provider_runs(provider="openai", model="o4-mini", api_key=os.environ["OPENAI_API_KEY"], num_runs=1)
#multiple_provider_runs(provider="openai", model="o1-preview", api_key=os.environ["OPENAI_API_KEY"], num_runs=1)


Expand Down
6 changes: 6 additions & 0 deletions libs/core/llmstudio_core/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,12 @@ providers:
input_token_cost: 0.0000011
cached_token_cost: 0.00000055
output_token_cost: 0.0000044
o4-mini:
mode: chat
max_completion_tokens: 200000
input_token_cost: 0.0000011
cached_token_cost: 0.000000275
output_token_cost: 0.0000044
gpt-4o-mini:
mode: chat
max_tokens: 128000
Expand Down