-
Notifications
You must be signed in to change notification settings - Fork 29
Add configurable timeout support for OpenAI client #2
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
base: main
Are you sure you want to change the base?
Add configurable timeout support for OpenAI client #2
Conversation
WalkthroughThis pull request introduces comprehensive timeout configuration support for OpenAI/Ollama requests across multiple configuration layers. Users can now specify request timeouts via settings.json, environment variables (OPENAI_TIMEOUT_MS, OLLAMA_TIMEOUT_MS), or CLI arguments (--openai-timeout-ms), with a precedence order of CLI > environment > settings. The resolved timeout value is threaded through the configuration hierarchy into the core Config class. Changes
Sequence DiagramsequenceDiagram
participant CLI as CLI Arguments
participant ENV as Environment Vars
participant Settings as settings.json
participant Parser as Timeout Parser
participant Config as Config Class
participant ContentGen as ContentGeneratorConfig
CLI->>Parser: openai-timeout-ms value
ENV->>Parser: OPENAI_TIMEOUT_MS / OLLAMA_TIMEOUT_MS
Settings->>Parser: timeoutMs from OllamaConfig
rect rgb(200, 220, 240)
Note over Parser: Precedence: CLI > ENV > Settings
Parser->>Config: contentGeneratorTimeoutMs (resolved)
end
Config->>Config: refreshAuth()
alt contentGeneratorTimeoutMs defined
Config->>ContentGen: Apply timeout
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
🧰 Additional context used🧬 Code graph analysis (2)packages/cli/src/config/config.test.ts (2)
packages/core/src/config/config.test.ts (2)
🪛 LanguageTooldocs/cli/configuration.md[style] ~218-~218: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase. (EN_WEAK_ADJECTIVE) 🔇 Additional comments (17)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
yeah i think this is working. i had a 30min agentic loop earlier. are we still maintaining this @tcsenpai? are there other projects to merge with? was there any possibility of integrating back into gemini-cli or the qwen client you forked (after they forked gemini-cli)? i'd like to collab on this as a daily driver, if you're interested. |
Summary
Testing
Summary by CodeRabbit
New Features
ollama.timeoutMs), environment variables (OPENAI_TIMEOUT_MS/OLLAMA_TIMEOUT_MS), and CLI flag (--openai-timeout-ms). Priority order: CLI flag → environment variables → settings (defaults to 120000ms).Documentation