Problem
The gem is hardcoded to OpenAI's SDK and Responses API, making it impossible to use with other AI providers like Minimax, Ollama, or any OpenAI-compatible API.
Specifically:
config.js — imports openai and creates a client with OPENAI_API_KEY only
ai.js — calls client.responses.create(), which is OpenAI's Responses API (not the standard Chat Completions API that compatible providers implement)
package.json — only includes the openai dependency
README.md and install_generator.rb — reference OpenAI exclusively
Desired Behavior
Users should be able to configure any OpenAI-compatible provider by setting environment variables:
| Variable |
Default |
Description |
AI_API_KEY |
(required) |
API key for the AI provider |
AI_MODEL |
gpt-4o |
Model to use |
AI_BASE_URL |
https://api.openai.com/v1 |
Base URL for the API (change for Minimax, Ollama, etc.) |
This way users can point the agent at any provider that implements the OpenAI Chat Completions API:
- OpenAI: default, no extra config needed
- Minimax: set
AI_BASE_URL=https://api.minimax.chat/v1 and AI_API_KEY
- Ollama: set
AI_BASE_URL=http://localhost:11434/v1 and any AI_API_KEY
- Azure OpenAI, Together AI, Groq, etc.
Required Changes
- Switch from
client.responses.create() (Responses API) to client.chat.completions.create() (Chat Completions API) — this is the universal standard
- Make the API key env var provider-agnostic (
AI_API_KEY, with OPENAI_API_KEY as fallback)
- Add
AI_BASE_URL config to point at any compatible endpoint
- Update README and generator instructions
Problem
The gem is hardcoded to OpenAI's SDK and Responses API, making it impossible to use with other AI providers like Minimax, Ollama, or any OpenAI-compatible API.
Specifically:
config.js— importsopenaiand creates a client withOPENAI_API_KEYonlyai.js— callsclient.responses.create(), which is OpenAI's Responses API (not the standard Chat Completions API that compatible providers implement)package.json— only includes theopenaidependencyREADME.mdandinstall_generator.rb— reference OpenAI exclusivelyDesired Behavior
Users should be able to configure any OpenAI-compatible provider by setting environment variables:
AI_API_KEYAI_MODELgpt-4oAI_BASE_URLhttps://api.openai.com/v1This way users can point the agent at any provider that implements the OpenAI Chat Completions API:
AI_BASE_URL=https://api.minimax.chat/v1andAI_API_KEYAI_BASE_URL=http://localhost:11434/v1and anyAI_API_KEYRequired Changes
client.responses.create()(Responses API) toclient.chat.completions.create()(Chat Completions API) — this is the universal standardAI_API_KEY, withOPENAI_API_KEYas fallback)AI_BASE_URLconfig to point at any compatible endpoint