Skip to content

Remove unused import openai from recursive-thinking-ai.py#9

Open
manato-tajiri wants to merge 1 commit into
PhialsBasement:mainfrom
manato-tajiri:fix/remove-unused-openai-import
Open

Remove unused import openai from recursive-thinking-ai.py#9
manato-tajiri wants to merge 1 commit into
PhialsBasement:mainfrom
manato-tajiri:fix/remove-unused-openai-import

Conversation

@manato-tajiri

@manato-tajiri manato-tajiri commented May 16, 2026

Copy link
Copy Markdown

Problem

recursive-thinking-ai.py imports openai on line 1, but this package is missing from requirements.txt, causing a ModuleNotFoundError when following the standard installation procedure.

See issue #2.

Analysis

The import openai is dead code — the script uses requests to call OpenRouter's API directly and never calls any function from the openai package.

Fix

Removed import openai from line 1 of recursive-thinking-ai.py.

This is the cleaner fix compared to adding openai to requirements.txt because:

  • The package is not actually used by the code
  • It avoids adding ~6MB of unnecessary dependencies
  • No changes to requirements.txt are needed

Verification

  • python -c py_compile confirms syntax is valid
  • No references to openai remain in any project files
  • Running uv pip install -r requirements.txt && python recursive-thinking-ai.py no longer produces ModuleNotFoundError

Closes #2

@manato-tajiri

Copy link
Copy Markdown
Author

@PhialsBasement This PR fixes the ModuleNotFoundError: No module named 'openai' issue. The fix is a one-line deletion — remove the unused import openai from recursive-thinking-ai.py. The openai SDK is not used anywhere in the code; all API calls go through requests directly. This is a minimal, safe change that resolves the issue for all users following the standard install procedure.

@manato-tajiri manato-tajiri force-pushed the fix/remove-unused-openai-import branch from 5b1a0b7 to 3b3b8e7 Compare May 22, 2026 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

requirements.txt missing openai package

1 participant