Skip to content
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

Support for o3-mini including reasoning_effort low/medium/high #728

Closed
simonw opened this issue Jan 31, 2025 · 5 comments
Closed

Support for o3-mini including reasoning_effort low/medium/high #728

simonw opened this issue Jan 31, 2025 · 5 comments
Labels
enhancement New feature or request openai

Comments

@simonw
Copy link
Owner

simonw commented Jan 31, 2025

Released today: https://openai.com/index/openai-o3-mini/

Now available to me in the API: simonw/scrape-openai-models@3b17a6b

@simonw simonw added enhancement New feature or request openai labels Jan 31, 2025
@simonw
Copy link
Owner Author

simonw commented Jan 31, 2025

I tested reasoning effort like this:

llm -m o3-mini 'write a poem about a pirate and a walrus'                         

Then:

llm -m o3-mini 'write a poem about a pirate and a walrus' -o reasoning_effort high

Then (this returned an error):

llm -m o3-mini 'write a poem about a pirate and a walrus' -o reasoning_effort dog 
Error: reasoning_effort
  Input should be 'low', 'medium' or 'high'

Running llm logs -n 2 -u confirmed that the high effort one used more reasoning tokens:

2025-01-31T20:02:52 conversation: 01jjyzb6rsn4y29mrhz05vss9m

Model: o3-mini

Prompt:

write a poem about a pirate and a walrus

Response:

Across the rolling tides of the brine-blue sea,
Sailed a pirate bold, with a heart wild and free.
His ship creaked with tales of treasures untold,
As he sought out fortunes, both daring and bold.

One foggy morn, beneath a silvery sun,
He spied on the horizon—an unlikely one.
A walrus arose, with tusks proud and grand,
Waddling ashore on the warm, golden sand.

The pirate, intrigued by this curious sight,
Called out with a grin, “What brings you to light?
Are you a guardian of secrets or hidden lore,
Or perhaps a creature from legends of yore?”

The walrus replied with a deep, thoughtful gaze,
“Arr, matey, I'm wanderin' through life's wandering maze.
I’ve seen icy realms and the aurora’s glow,
And learned that true treasure is the journey we know.”

Together they roamed through coves and ancient caves,
In search of stories that the wide ocean paves.
The pirate learned wisdom from the walrus's lore,
That not all riches glitter, but adventures endure.

When twilight fell and stars pierced the night,
The pirate and walrus shared campfire light.
With laughter and dreams whispered soft and true,
They forged an odd friendship as deep as the blue.

So remember the tale of the pirate and the muse,
Who discovered that hearts choose what they choose.
For sometimes the richest treasure that fate bestows,
Is the bond found between the unexpected foes.

Token usage:

16 input, 463 output, {"completion_tokens_details": {"reasoning_tokens": 128}}

2025-01-31T20:03:04 conversation: 01jjyzbr47m155gxj2pkh96awn

Model: o3-mini

Prompt:

write a poem about a pirate and a walrus

Response:

Beneath a sky of endless blue, on a wild and foaming sea,
A daring pirate roamed the waves in search of destiny.
His weathered coat and gleaming sword hinted tales of days gone by,
Yet fate would guide him to a friend beneath the polar sky.

One crisp, chill morn upon the shore, where icy currents blend,
He spied a gentle, mighty beast—a walrus and a friend.
With regal tusks and whiskered charm that whispered ancient lore,
The walrus smiled in silent mirth, inviting him ashore.

Side by side they wandered far to realms of magic, ice, and foam,
The pirate spun his swashbuckling yarns while the walrus called sea home.
They laughed at storms and shared warm dreams beneath the dancing stars,
For treasures true are not of gold, but found in hearts afar.

Their friendship forged on storied waves, defied both time and tide,
Exploring hidden coves and isles where mystery would abide.
The pirate learned of nature’s grace from his noble, tusked ally,
And the walrus cherished every word as evenings passed him by.

So echoes sing along the coast from every distant bay,
Of a pirate bold and his dear friend who traveled night and day.
In every wave and whispered wind, their legend lives on still—
A timeless tale of unlikely kin united by free will.

Token usage:

16 input, 1,264 output, {"completion_tokens_details": {"reasoning_tokens": 960}}

@rdslw
Copy link

rdslw commented Jan 31, 2025

God, youre fast @simonw :)
I came here to created issue, and here is already commit with patch from you :)

Quick question: can I cleanly apply it to 0.20 release or I must wait for 0.21 with those changes?

@simonw
Copy link
Owner Author

simonw commented Jan 31, 2025

Quick question: can I cleanly apply it to 0.20 release or I must wait for 0.21 with those changes?

I'll have a release out in a few minutes.

@simonw
Copy link
Owner Author

simonw commented Jan 31, 2025

Tests are failing due to a weird Black issue:

I'll resolve for the moment by pinning to the previous Black release.

simonw added a commit that referenced this issue Jan 31, 2025
@simonw
Copy link
Owner Author

simonw commented Jan 31, 2025

Released: https://github.com/simonw/llm/releases/tag/0.21

@simonw simonw closed this as completed Jan 31, 2025
simonw added a commit that referenced this issue Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request openai
Projects
None yet
Development

No branches or pull requests

2 participants