-
Notifications
You must be signed in to change notification settings - Fork 684
feat: add NanoGPT as AI provider #2746
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?
Conversation
WalkthroughAdds NanoGPT as a supported AI provider across the project. Changes include: new constants and defaults for NanoGPT (model, endpoint, API token secret), a CLI flag and Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: Repository UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2025-10-15T03:21:02.229ZApplied to files:
🔇 Additional comments (3)
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
cmd/testai/main-testai.godocs/docs/waveai-modes.mdxpkg/aiusechat/uctypes/uctypes.gopkg/aiusechat/usechat-mode.gopkg/wconfig/settingsconfig.goschema/waveai.json
🧰 Additional context used
🧬 Code graph analysis (2)
pkg/aiusechat/usechat-mode.go (1)
pkg/aiusechat/uctypes/uctypes.go (2)
AIProvider_NanoGPT(30-30)APIType_OpenAIChat(22-22)
cmd/testai/main-testai.go (3)
pkg/aiusechat/uctypes/uctypes.go (8)
ToolDefinition(100-116)AIOptsType(271-285)APIType_OpenAIChat(22-22)ThinkingLevelMedium(156-156)AIMessage(360-363)AIMessagePart(365-381)AIMessagePartTypeText(355-355)WaveChatOpts(516-536)frontend/app/aipanel/aimessage.tsx (1)
AIMessage(210-267)pkg/aiusechat/usechat.go (1)
WaveAIPostMessageWrap(543-585)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: merge-gatekeeper
🔇 Additional comments (10)
pkg/aiusechat/usechat-mode.go (2)
104-114: LGTM! Implementation follows established patterns.The NanoGPT provider defaults are implemented consistently with the OpenRouter provider (lines 93-103). The approach of not setting default capabilities is appropriate for a proxy service where model capabilities vary.
24-24: NanoGPT endpoint URL is correct. The endpointhttps://nano-gpt.com/api/v1/chat/completionsmatches the official NanoGPT API documentation for chat completions and is properly integrated throughout the codebase.pkg/aiusechat/uctypes/uctypes.go (1)
30-30: LGTM! Constant follows naming conventions.The constant is correctly defined and follows the established pattern for AI provider identifiers.
schema/waveai.json (1)
24-24: LGTM! Schema enum updated correctly.The "nanogpt" value is properly added to the provider enum and follows the existing naming pattern.
docs/docs/waveai-modes.mdx (2)
37-37: LGTM! Provider list updated correctly.The NanoGPT entry is properly added to the supported providers list with an anchor link to the detailed section.
234-266: Verify specific model availability on NanoGPT.The API endpoint (
https://nano-gpt.com/api/v1/models?detailed=true) is correct. However, the specific model names referenced—"zai-org/glm-4.7" and "openai/gpt-5"—should be confirmed as available on NanoGPT. While NanoGPT does expose models using provider model IDs, the exact format and current availability of these specific models need to be validated directly against the NanoGPT models list to ensure the documentation examples are accurate.pkg/wconfig/settingsconfig.go (1)
272-272: LGTM! Jsonschema enum updated correctly.The "nanogpt" value is properly added to the Provider field's jsonschema enum, maintaining consistency with the JSON schema file.
cmd/testai/main-testai.go (3)
435-435: LGTM!Documentation and usage examples are consistent with other providers and follow established patterns.
Also applies to: 444-445, 455-455, 462-462
467-467: LGTM!Flag handling and execution flow are correctly implemented and consistent with existing provider integrations. The conditional logic properly routes to
testNanoGPTwhen the--nanogptflag is set, and default model selection is handled appropriately.Also applies to: 472-472, 475-475, 516-517, 542-543
30-30: Verify the model identifier with NanoGPT documentation.The constant declaration follows established naming patterns, but the model identifier "zai-org/glm-4.7" could not be confirmed against publicly available NanoGPT model listings. Consult the NanoGPT models catalog or API endpoint (
/api/v1/models) to confirm this model is available before merging.
|
@coderabbitai generate docstrings |
✅ Actions performedInitiated docstring generation; will generate only if new commits exist. |
|
Note Docstrings generation - SUCCESS |
Docstrings generation was requested by @0xGingi. * #2746 (comment) The following files were modified: * `cmd/testai/main-testai.go` * `pkg/aiusechat/usechat-mode.go`
|
@0xGingi thanks for submitting, will take a look. at first glance looks good |
adds https://nano-gpt.com as a provider