fix: skip API key requirement when only non-LLM tools are enabled#409
fix: skip API key requirement when only non-LLM tools are enabled#409vedant-hawcx wants to merge 3 commits intoBeehiveInnovations:mainfrom
Conversation
Tools like `clink`, `version`, `listmodels`, `challenge`, and `apilookup` don't require any LLM provider. When all LLM-requiring tools are disabled via DISABLED_TOOLS, the server should start without requiring API keys. Previously, the server would crash with "At least one API configuration is required" even when only clink was needed. This change makes the provider and auto-mode validation conditional on whether any LLM tools are actually active. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the server's startup flexibility by making API key requirements conditional. Previously, the server would crash if no API keys were configured, even when only non-LLM tools were intended for use. The changes ensure that the server can start and operate non-LLM tools without requiring any API provider setup, improving user experience for specific use cases and providing clearer feedback through warnings instead of errors. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly modifies the server startup logic to allow running without any LLM API keys when only non-LLM tools are enabled. The changes conditionally enforce provider configuration and auto-mode validation based on whether any LLM-requiring tools are active. The implementation is sound. I have one suggestion to improve code organization by moving a constant to the module level.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a032e61547
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…hardcoded set Replace the hardcoded NON_LLM_TOOLS allowlist with a dynamic check using each tool's requires_model() method. This correctly classifies tools like planner, docgen, tracer, and consensus as non-LLM tools, since they declare requires_model=False. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
DISABLED_TOOLS, the server now starts without requiring any API keysclink,version,listmodels,challenge,apilookup) work independently of provider configurationProblem
If you only need
clinkto bridge requests to external CLI programs, you still had to configure a valid API key or the server would crash on startup with:This forced users to obtain and configure API keys they don't need.
Changes
server.py: Made the provider requirement check conditional — only enforced when LLM tools are in the active tool setserver.py: Made the auto-mode model availability check conditional on LLM tools being activeTest plan
DISABLED_TOOLS=analyze,refactor,testgen,secaudit,docgen,tracer,chat,thinkdeep,planner,consensus,codereview,precommit,debugand placeholder API keysWARNING - No API providers configured. Only non-LLM tools (clink, version, etc.) will be available.Server ready - waiting for tool requests...