{"id":27025,"library":"gpt-oss","title":"GPT-OSS","description":"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.","status":"active","version":"0.0.9","language":"python","source_language":"en","source_url":"https://github.com/openai/gpt-oss","tags":["gpt","inference","openai","llm"],"install":[{"cmd":"pip install gpt-oss","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Array operations and data handling","package":"numpy","optional":false},{"reason":"PyTorch tensors and neural network modules","package":"torch","optional":false}],"imports":[{"note":"Hyphen in package name becomes underscore in imports.","wrong":"from gptoss import GPTInference","symbol":"GPTInference","correct":"from gpt_oss import GPTInference"}],"quickstart":{"code":"from gpt_oss import GPTInference\nimport os\n\napi_key = os.environ.get('OPENAI_API_KEY', '')\nmodel = GPTInference(model_name='gpt-3.5-turbo', api_key=api_key)\nresponse = model.generate(\"Hello, world!\")\nprint(response)","lang":"python","description":"Initialize GPTInference with an API key from environment variable and generate a response."},"warnings":[{"fix":"Upgrade Python to 3.12 or later.","message":"Python >=3.12 is required. Older versions will fail to install or import.","severity":"breaking","affected_versions":"<0.0.9"},{"fix":"Use `max_new_tokens` instead of `max_tokens`.","message":"The `generate` method's argument `max_tokens` has been renamed to `max_new_tokens` in v0.0.9.","severity":"deprecated","affected_versions":">=0.0.7"},{"fix":"Use `from gpt_oss import ...`","message":"Import uses underscore (`gpt_oss`) not hyphen (`gpt-oss`).","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use `from gpt_oss import ...`","cause":"Incorrect import path - hyphen instead of underscore.","error":"ModuleNotFoundError: No module named 'gptoss'"},{"fix":"Install the latest VC++ Redistributable from Microsoft.","cause":"Missing or incompatible Microsoft Visual C++ Redistributable on Windows.","error":"ImportError: DLL load failed while importing gpt_oss"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}