Skip to content

Update AI provider configuration formatting - #249

Merged
shunkakinoki merged 4 commits into
mainfrom
add-ai-provider-configs
Sep 30, 2025
Merged

Update AI provider configuration formatting#249
shunkakinoki merged 4 commits into
mainfrom
add-ai-provider-configs

Conversation

@shunkakinoki

Copy link
Copy Markdown
Owner

Summary

  • Updated the AI provider configuration in opencode.jsonc to improve formatting consistency
  • Added proper indentation for the "order" array in the "moonshotai/kimi-k2" provider settings
  • Added newline at end of file

Changes

  • Modified home-manager/modules/opencode/opencode.jsonc to improve code formatting
  • Added proper multi-line array formatting for provider order configuration
  • Ensured file ends with newline character

Impact

This change improves code readability and formatting consistency in the AI provider configuration file without changing any functional behavior.

@coderabbitai

coderabbitai Bot commented Sep 30, 2025

Copy link
Copy Markdown

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Updated the display name of the lmstudio model “qwen/qwen3-coder-30b” to “Qwen: Qwen3 Coder 30B A3B Instruct” in visible model lists.
    • Affects how the model appears in selection menus and listings.
    • No changes to defaults, provider configuration, or behavior; other models remain unchanged.
    • Existing setups continue to work without action.

Walkthrough

Updated a single model display name in the lmstudio provider mapping: qwen/qwen3-coder-30b display name changed to include "A3B Instruct".

Changes

Cohort / File(s) Summary of Changes
Model display-name update
home-manager/modules/opencode/opencode.jsonc
In provider lmstudiomodels.qwen/qwen3-coder-30b, changed name from Qwen: Qwen3 Coder 30B to Qwen: Qwen3 Coder 30B A3B Instruct.

Sequence Diagram(s)

(omitted — change is a single metadata rename; no control-flow changes)

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

A hop, I tweak a model's name with care,
One label changed, a whisker in the air.
LM Studio nods, the mapping's now precise,
A tiny tweak, yet tidy and nice. 🥕🐇

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title concisely and accurately summarizes the primary change of the pull request, focusing on updating the AI provider configuration formatting which reflects the main intent to improve consistency and readability in the opencode.jsonc file.
Description Check ✅ Passed The description clearly describes the formatting improvements made in the AI provider configuration, including indentation changes and the addition of a newline, directly reflecting the changes in the opencode.jsonc file.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-ai-provider-configs

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between f7700ce and 545397c.

📒 Files selected for processing (1)
  • home-manager/modules/opencode/opencode.jsonc (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • home-manager/modules/opencode/opencode.jsonc
⏰ 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). (7)
  • GitHub Check: e2e-run (MacOS, macos-latest)
  • GitHub Check: e2e-run (Ubuntu, ubuntu-latest)
  • GitHub Check: e2e-run (NixOS, ubuntu-latest)
  • GitHub Check: docker-build-push (linux/amd64, -amd64, amd64)
  • GitHub Check: nix-darwin
  • GitHub Check: nix-nixos
  • GitHub Check: nix-linux

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.

❤️ Share
🧪 Early access (Sonnet 4.5): enabled

We are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience.

Note:

  • Public repositories are always opted into early access features.
  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @shunkakinoki, 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 updates the AI provider configuration in opencode.jsonc by adding detailed settings for LM Studio, Ollama, and OpenRouter. The primary goal is to enhance formatting consistency and readability within the configuration file, particularly for nested array structures, without introducing any functional changes to the application's behavior.

Highlights

  • AI Provider Configuration: Introduced new AI provider configurations for LM Studio, Ollama, and OpenRouter within the opencode.jsonc file.
  • Formatting Consistency: Improved formatting and indentation, specifically for the 'order' array within the 'moonshotai/kimi-k2' provider settings under OpenRouter.
  • File End Newline: Ensured the opencode.jsonc file ends with a newline character for better consistency.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds new AI provider configurations to opencode.jsonc. The PR description, however, focuses on formatting changes, which may be misleading as it appears new configuration is being added. It would be beneficial to update the PR description to accurately reflect the scope of the changes for better historical context. I have also added a specific comment where the implemented formatting for an array does not match what is described in the PR summary.

"moonshotai/kimi-k2": {
"options": {
"provider": {
"order": ["baseten"],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The pull request description mentions 'Added proper multi-line array formatting for provider order configuration'. However, the order array is currently on a single line. To align with the stated intent in the description, consider formatting it across multiple lines. This also improves readability and maintainability, especially if more providers are added to the list in the future.

							"order": [
								"baseten"
							],

coderabbitai[bot]
coderabbitai Bot previously requested changes Sep 30, 2025

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 3ab9937 and f7700ce.

📒 Files selected for processing (1)
  • home-manager/modules/opencode/opencode.jsonc (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
home-manager/**

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

Keep home-manager configurations under home-manager/

Files:

  • home-manager/modules/opencode/opencode.jsonc
⏰ 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). (7)
  • GitHub Check: nix-linux
  • GitHub Check: nix-nixos
  • GitHub Check: nix-darwin
  • GitHub Check: e2e-run (MacOS, macos-latest)
  • GitHub Check: e2e-run (NixOS, ubuntu-latest)
  • GitHub Check: e2e-run (Ubuntu, ubuntu-latest)
  • GitHub Check: docker-build-push (linux/amd64, -amd64, amd64)
🔇 Additional comments (4)
home-manager/modules/opencode/opencode.jsonc (4)

5-5: Verify autoupdate security implications.

With autoupdate: true, the system may automatically fetch and apply updates. Ensure that update mechanisms have proper validation and security checks in place, especially when combined with custom provider configurations that specify external URLs.


7-18: LGTM: LM Studio configuration is well-structured.

The lmstudio provider configuration correctly uses the OpenAI-compatible adapter with proper localhost baseURL and clear model naming conventions.


31-42: Consider reliability implications of disabling fallbacks.

The openrouter configuration for "moonshotai/kimi-k2" sets allow_fallbacks: false and restricts the provider order to only ["baseten"]. This creates a single point of failure—if the baseten provider is unavailable, requests will fail without attempting alternatives.

Consider whether this strict provider requirement is intentional for your use case, or if enabling fallbacks would improve reliability.


6-43: PR description inconsistency: This adds new functionality, not just formatting.

The PR objectives describe this as a "formatting update" with "indentation improvements" and "multi-line array formatting." However, the changes introduce an entirely new provider configuration block with three provider definitions (lmstudio, ollama, openrouter), including base URLs, npm adapters, and model mappings.

This represents new functionality rather than formatting changes. Please update the PR description to accurately reflect that this adds AI provider configuration capabilities.

Comment on lines +25 to +28
"models": {
"openai/gpt-oss-20b": {
"name": "OpenAI: gpt-oss-20b"
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify the Ollama model identifier.

The model identifier "openai/gpt-oss-20b" under the Ollama provider seems unusual. Ollama models typically don't use the "openai/" prefix. Please verify this is the correct model identifier for your Ollama setup.


🏁 Script executed:

#!/bin/bash
# Description: Search for documentation or usage of "gpt-oss-20b" model in the codebase

# Search for references to this model
rg -i "gpt-oss-20b" -C3

Length of output: 924


Ensure model identifier matches your Ollama config
Replace "openai/gpt-oss-20b" in home-manager/modules/opencode/opencode.jsonc with "openai/gpt-oss:20b" (colon) so it aligns with gpt-oss:20b in modules/codex/config.toml.

🤖 Prompt for AI Agents
In home-manager/modules/opencode/opencode.jsonc around lines 25 to 28, the model
identifier uses "openai/gpt-oss-20b" which doesn't match the Ollama config;
update that value to "openai/gpt-oss:20b" (replace the hyphen with a colon) so
it aligns with gpt-oss:20b in modules/codex/config.toml and any other
references.

@shunkakinoki
shunkakinoki enabled auto-merge (squash) September 30, 2025 15:35
@shunkakinoki
shunkakinoki merged commit 8bfbab1 into main Sep 30, 2025
18 checks passed
@shunkakinoki
shunkakinoki deleted the add-ai-provider-configs branch September 30, 2025 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant