Registry / llm-agents / gpt-oss

gpt-oss

JSON →
library0.0.9pypypi✓ verified 82d ago

gpt-oss is a collection of reference inference implementations for GPT models, published by OpenAI. Current version is 0.0.9, requiring Python >=3.12. It is in early development with weekly releases.

pip install gpt-oss
INSTALL
IMPORT
SIG · GPT-OSS
G
gpt-oss
llm-agentspythonv0.0.9
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

GPTInference
import gpt_oss
from gpt_oss import GPTInference

Initialize GPTInference with an API key from environment variable and generate a response.

from gpt_oss import GPTInference import os api_key = os.environ.get('OPENAI_API_KEY', '') model = GPTInference(model_name='gpt-3.5-turbo', api_key=api_key) response = model.generate("Hello, world!") print(response)
Debug
Known issues
breakingPython >=3.12 is required. Older versions will fail to install or import.
fix
Upgrade Python to 3.12 or later.
affects: <0.0.9
deprecatedThe `generate` method's argument `max_tokens` has been renamed to `max_new_tokens` in v0.0.9.
fix
Use `max_new_tokens` instead of `max_tokens`.
affects: >=0.0.7
gotchaImport uses underscore (`gpt_oss`) not hyphen (`gpt-oss`).
fix
Use `from gpt_oss import ...`
affects: all
Upgrade
Version history
0.0.9latest on PyPI · released Jan 13, 2026
Audit
Dependencies
numpyrequiredArray operations and data handling
torchrequiredPyTorch tensors and neural network modules
Agent activity
19 hits · last 30 days
node
18
OpenAI (training)
1
Resources
gpt-oss — pip install gpt-oss · libregistry