Conversation
WalkthroughAdds an Ollama-based model configuration for Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 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.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@packages/next-wxt/entrypoints/sidepanel/model-config.ts`:
- Line 50: DEFAULT_MODEL_CONFIGS currently contains an entry with baseURL:
'http://localhost:11434/api' which will break for users without Ollama; update
that model config (the entry in DEFAULT_MODEL_CONFIGS that references the
localhost baseURL) to either remove or blank the baseURL and mark it as
local-only by adding a property like localOnly: true or featureFlag:
'ollamaLocal', and update its label (e.g., label: 'deepseek-r1:1.5b (Local)') so
the UI can hide or display it behind a feature flag or show a clear
local/dev-only indicator; ensure any UI code that reads DEFAULT_MODEL_CONFIGS
respects the new localOnly/featureFlag property to avoid presenting the option
to general users.
- Line 53: The icon properties for the Deepseek entries are missing markRaw
wrapping which causes Vue to make the icon components reactive; update the icon
assignments (e.g., the line setting "icon: IconModelDeepseek as unknown as
Component" and the DeepSeek-R1 entry) to wrap the icon with Vue's markRaw (so
use markRaw(IconModelDeepseek) and markRaw for the DeepSeek-R1 icon) to prevent
deep reactivity and avoid dev warnings; locate these in the model-config entries
for the Deepseek models and replace the bare icon references with
markRaw-wrapped references.
🧹 Nitpick comments (1)
packages/next-wxt/package.json (1)
23-23: Inconsistent version management — consider usingcatalog:like other dependencies.All other entries in
dependenciesuse"catalog:"for centralized version management via the pnpm workspace catalog. Hardcoding"~3.3.0"here breaks that convention and may lead to version drift. Addollama-ai-provider-v2to the workspace catalog and reference it as"catalog:"here.- "ollama-ai-provider-v2": "~3.3.0", + "ollama-ai-provider-v2": "catalog:",
| label: 'deepseek-r1:1.5b', | ||
| model: 'deepseek-r1:1.5b', | ||
| apiKey: 'sk-trial', | ||
| baseURL: 'http://localhost:11434/api', |
There was a problem hiding this comment.
Localhost URL in default config — will fail for users without a local Ollama instance.
baseURL: 'http://localhost:11434/api' is hardcoded in DEFAULT_MODEL_CONFIGS, which is shipped as the default. Users who haven't set up Ollama locally will see connection errors when this model is selected. Consider either hiding this config behind a feature flag, marking it as a local/dev-only option, or adding a clear label (e.g., label: 'deepseek-r1:1.5b (Local)') so users understand the prerequisite.
🤖 Prompt for AI Agents
In `@packages/next-wxt/entrypoints/sidepanel/model-config.ts` at line 50,
DEFAULT_MODEL_CONFIGS currently contains an entry with baseURL:
'http://localhost:11434/api' which will break for users without Ollama; update
that model config (the entry in DEFAULT_MODEL_CONFIGS that references the
localhost baseURL) to either remove or blank the baseURL and mark it as
local-only by adding a property like localOnly: true or featureFlag:
'ollamaLocal', and update its label (e.g., label: 'deepseek-r1:1.5b (Local)') so
the UI can hide or display it behind a feature flag or show a clear
local/dev-only indicator; ensure any UI code that reads DEFAULT_MODEL_CONFIGS
respects the new localOnly/featureFlag property to avoid presenting the option
to general users.
| baseURL: 'http://localhost:11434/api', | ||
| providerType: createOllama, | ||
| useReActMode: false, | ||
| icon: IconModelDeepseek as unknown as Component |
There was a problem hiding this comment.
Missing markRaw() wrapper on icon.
Lines 32, 69, and 77 wrap the icon component with markRaw() to prevent Vue from making it deeply reactive. This entry (and the DeepSeek-R1 entry on line 43) omit it, which can cause Vue reactivity warnings in dev mode and unnecessary overhead.
Proposed fix
- icon: IconModelDeepseek as unknown as Component
+ icon: markRaw(IconModelDeepseek as unknown as Component)Also consider fixing line 43 for consistency.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| icon: IconModelDeepseek as unknown as Component | |
| icon: markRaw(IconModelDeepseek as unknown as Component) |
🤖 Prompt for AI Agents
In `@packages/next-wxt/entrypoints/sidepanel/model-config.ts` at line 53, The icon
properties for the Deepseek entries are missing markRaw wrapping which causes
Vue to make the icon components reactive; update the icon assignments (e.g., the
line setting "icon: IconModelDeepseek as unknown as Component" and the
DeepSeek-R1 entry) to wrap the icon with Vue's markRaw (so use
markRaw(IconModelDeepseek) and markRaw for the DeepSeek-R1 icon) to prevent deep
reactivity and avoid dev warnings; locate these in the model-config entries for
the Deepseek models and replace the bare icon references with markRaw-wrapped
references.
Pull Request (OpenTiny NEXT-SDKs)
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit