json not suited for config file, way too complex #2008

Closed
opened 2026-02-16 17:33:42 -05:00 by yindo · 9 comments
Owner

Originally created by @SkybuckFlying on GitHub (Oct 8, 2025).

Originally assigned to: @rekram1-node on GitHub.

The number of possibilities where to add certain sections in trees is endless... let's call this the "endless tree possibilities".

Use something simpler.

Originally created by @SkybuckFlying on GitHub (Oct 8, 2025). Originally assigned to: @rekram1-node on GitHub. The number of possibilities where to add certain sections in trees is endless... let's call this the "endless tree possibilities". Use something simpler.
yindo closed this issue 2026-02-16 17:33:42 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 8, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #1998: Split off MCP server configuration from config.json - addresses similar concern about config file becoming too complex and proposes splitting into multiple files
  • #1658: Substitute contents of a file as json object in config - discusses complexity of current JSON config approach and need for simpler alternatives
  • #2066: Add --config CLI flag to specify custom config file path - provides alternative approach to config management to address usability issues

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Oct 8, 2025): This issue might be a duplicate of existing issues. Please check: - #1998: Split off MCP server configuration from config.json - addresses similar concern about config file becoming too complex and proposes splitting into multiple files - #1658: Substitute contents of a file as json object in config - discusses complexity of current JSON config approach and need for simpler alternatives - #2066: Add --config CLI flag to specify custom config file path - provides alternative approach to config management to address usability issues Feel free to ignore if none of these address your specific case.
Author
Owner

@SkybuckFlying commented on GitHub (Oct 8, 2025):

If you disagree here is my follow up: add some arrays to the mix and you have a nice complex mess.

Even the AI cannot make sense of it.

@SkybuckFlying commented on GitHub (Oct 8, 2025): If you disagree here is my follow up: add some arrays to the mix and you have a nice complex mess. Even the AI cannot make sense of it.
Author
Owner

@SkybuckFlying commented on GitHub (Oct 8, 2025):

Here is my final argument against this or at least practice:

Version differences. AI is totally confused... I also cannot make sense of it.

Current config file:

Working:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "ollama": {
      "npm": "@ai-sdk/openai-compatible",
      "options": {
        "baseURL": "http://localhost:11434/v1"
      },
      "models": {
        "granite4:micro": {
          "tools": true,
          "context": 32768,
          "contextWindow": 32768,
          "num_ctx": 32768
        },
        "gpt-oss:20b": {
          "tools": true,
          "context": 32768,
          "contextWindow": 32768,
          "num_ctx": 32768
        },
        "QWEN3-4B-8K-ContextWindow:latest": {
          "tools": true,
          "thinking": true,
          "context": 8000,
          "contextWindow": 8000,
          "num_ctx": 8000
        },
        "QWEN3-14B-3K-ContextWindow:latest": {
          "tools": true,
          "thinking": true,
          "context": 3000,
          "contextWindow": 3000,
          "num_ctx": 3000
        },
        "QWEN3-14B-4K-ContextWindow:latest": {
          "tools": true,
          "thinking": true,
          "context": 4000,
          "contextWindow": 4000,
          "num_ctx": 4000
        },
        "QWEN3-14B-8K-ContextWindow:latest": {
          "tools": true,
          "thinking": true,
          "context": 8000,
          "contextWindow": 8000,
          "num_ctx": 8000
        },
        "QWEN3-14B-16K-ContextWindow:latest": {
          "tools": true,
          "thinking": true,
          "context": 16000,
          "contextWindow": 16000,
          "num_ctx": 16000
        },
        "QWEN3-14B-40K-ContextWindow:latest": {
          "tools": true,
          "thinking": true,
          "context": 40000,
          "contextWindow": 40000,
          "num_ctx": 40000
        }
      }
    }
  }
}

Not sure which context parameter to use, so I tried all 3.

So far trying to get tooling working failed, here is one version which failed:


{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "ollama": {
      "npm": "@ai-sdk/openai-compatible",
      "options": {
        "baseURL": "http://localhost:11434/v1"
      },
      "models": {
        "granite4:micro": {
          "tools": true,
          "context": 32768,
          "contextWindow": 32768,
          "num_ctx": 32768
        },
        "gpt-oss:20b": {
          "tools": true,
          "context": 32768,
          "contextWindow": 32768,
          "num_ctx": 32768
        },
        "QWEN3-4B-8K-ContextWindow:latest": {
          "tools": true,
          "thinking": true,
          "context": 8000,
          "contextWindow": 8000,
          "num_ctx": 8000
        },
        "QWEN3-14B-3K-ContextWindow:latest": {
          "tools": true,
          "thinking": true,
          "context": 3000,
          "contextWindow": 3000,
          "num_ctx": 3000
        },
        "QWEN3-14B-4K-ContextWindow:latest": {
          "tools": true,
          "thinking": true,
          "context": 4000,
          "contextWindow": 4000,
          "num_ctx": 4000
        },
        "QWEN3-14B-8K-ContextWindow:latest": {
          "tools": true,
          "thinking": true,
          "context": 8000,
          "contextWindow": 8000,
          "num_ctx": 8000
        },
        "QWEN3-14B-16K-ContextWindow:latest": {
          "tools": true,
          "thinking": true,
          "context": 16000,
          "contextWindow": 16000,
          "num_ctx": 16000
        },
        "QWEN3-14B-40K-ContextWindow:latest": {
          "tools": true,
          "thinking": true,
          "context": 40000,
          "contextWindow": 40000,
          "num_ctx": 40000
        }
      }
    }
  },
  "tools": {
    "chat": {
      "type": "executable",
      "path": "G:\\Junk\\Chat\\Win32\\Debug\\chat.exe",
      "args": {
        "input": {
          "type": "string",
          "required": true,
          "flag": null,
          "description": "Text prompt to send to chat.exe"
        }
      },
      "output": {
        "type": "stdout",
        "format": "text",
        "capture": true
      },
      "timeout": 30,
      "enabled": true
    }
  }
}
@SkybuckFlying commented on GitHub (Oct 8, 2025): Here is my final argument against this or at least practice: Version differences. AI is totally confused... I also cannot make sense of it. Current config file: Working: ``` { "$schema": "https://opencode.ai/config.json", "provider": { "ollama": { "npm": "@ai-sdk/openai-compatible", "options": { "baseURL": "http://localhost:11434/v1" }, "models": { "granite4:micro": { "tools": true, "context": 32768, "contextWindow": 32768, "num_ctx": 32768 }, "gpt-oss:20b": { "tools": true, "context": 32768, "contextWindow": 32768, "num_ctx": 32768 }, "QWEN3-4B-8K-ContextWindow:latest": { "tools": true, "thinking": true, "context": 8000, "contextWindow": 8000, "num_ctx": 8000 }, "QWEN3-14B-3K-ContextWindow:latest": { "tools": true, "thinking": true, "context": 3000, "contextWindow": 3000, "num_ctx": 3000 }, "QWEN3-14B-4K-ContextWindow:latest": { "tools": true, "thinking": true, "context": 4000, "contextWindow": 4000, "num_ctx": 4000 }, "QWEN3-14B-8K-ContextWindow:latest": { "tools": true, "thinking": true, "context": 8000, "contextWindow": 8000, "num_ctx": 8000 }, "QWEN3-14B-16K-ContextWindow:latest": { "tools": true, "thinking": true, "context": 16000, "contextWindow": 16000, "num_ctx": 16000 }, "QWEN3-14B-40K-ContextWindow:latest": { "tools": true, "thinking": true, "context": 40000, "contextWindow": 40000, "num_ctx": 40000 } } } } } ``` Not sure which context parameter to use, so I tried all 3. So far trying to get tooling working failed, here is one version which failed: ``` { "$schema": "https://opencode.ai/config.json", "provider": { "ollama": { "npm": "@ai-sdk/openai-compatible", "options": { "baseURL": "http://localhost:11434/v1" }, "models": { "granite4:micro": { "tools": true, "context": 32768, "contextWindow": 32768, "num_ctx": 32768 }, "gpt-oss:20b": { "tools": true, "context": 32768, "contextWindow": 32768, "num_ctx": 32768 }, "QWEN3-4B-8K-ContextWindow:latest": { "tools": true, "thinking": true, "context": 8000, "contextWindow": 8000, "num_ctx": 8000 }, "QWEN3-14B-3K-ContextWindow:latest": { "tools": true, "thinking": true, "context": 3000, "contextWindow": 3000, "num_ctx": 3000 }, "QWEN3-14B-4K-ContextWindow:latest": { "tools": true, "thinking": true, "context": 4000, "contextWindow": 4000, "num_ctx": 4000 }, "QWEN3-14B-8K-ContextWindow:latest": { "tools": true, "thinking": true, "context": 8000, "contextWindow": 8000, "num_ctx": 8000 }, "QWEN3-14B-16K-ContextWindow:latest": { "tools": true, "thinking": true, "context": 16000, "contextWindow": 16000, "num_ctx": 16000 }, "QWEN3-14B-40K-ContextWindow:latest": { "tools": true, "thinking": true, "context": 40000, "contextWindow": 40000, "num_ctx": 40000 } } } }, "tools": { "chat": { "type": "executable", "path": "G:\\Junk\\Chat\\Win32\\Debug\\chat.exe", "args": { "input": { "type": "string", "required": true, "flag": null, "description": "Text prompt to send to chat.exe" } }, "output": { "type": "stdout", "format": "text", "capture": true }, "timeout": 30, "enabled": true } } } ```
Author
Owner

@SkybuckFlying commented on GitHub (Oct 8, 2025):

Then tried chat.md also failed:


description: Chat with other AIs

Chat with others:
!chat $ARGUMENTS

I haven't even tried MCP and probably never will, if simple shit like this is not working than MCP has no chance what so ever... maybe I try it sometime in future but tired of complex shit... gemini-cli on the other hand works very easily with *.exe files in chat.

Focus on that..

All this configuration mess, getting tired of it, it never really works well in any tool. I am surprised I got the context and read/write/edit files tools working a little bit, but depends on context size...

Congrats on that at least, first tool that actually work locally, but only with qwen3 models so far, experimenting with different model sizes and context sizes... meanwhile strange download phenomenon going on with 8gb model.

@SkybuckFlying commented on GitHub (Oct 8, 2025): Then tried chat.md also failed: --- description: Chat with other AIs --- Chat with others: !`chat $ARGUMENTS` I haven't even tried MCP and probably never will, if simple shit like this is not working than MCP has no chance what so ever... maybe I try it sometime in future but tired of complex shit... gemini-cli on the other hand works very easily with *.exe files in chat. Focus on that.. All this configuration mess, getting tired of it, it never really works well in any tool. I am surprised I got the context and read/write/edit files tools working a little bit, but depends on context size... Congrats on that at least, first tool that actually work locally, but only with qwen3 models so far, experimenting with different model sizes and context sizes... meanwhile strange download phenomenon going on with 8gb model.
Author
Owner

@rekram1-node commented on GitHub (Oct 8, 2025):

what would you suggest instead?

JSON allows for both very simple and very complex setups, if you refer to the schema for the config: https://opencode.ai/config.json an LLM can quickly make sense of how to properly structure it.

As for your ollama context vars i can help you with that if that is still an issue

@rekram1-node commented on GitHub (Oct 8, 2025): what would you suggest instead? JSON allows for both very simple and very complex setups, if you refer to the schema for the config: https://opencode.ai/config.json an LLM can quickly make sense of how to properly structure it. As for your ollama context vars i can help you with that if that is still an issue
Author
Owner

@anuramat commented on GitHub (Oct 8, 2025):

is a different format really gonna help?

ps: you might wanna get a json language server:

Image Image
@anuramat commented on GitHub (Oct 8, 2025): is a different format really gonna help? ps: you might wanna get a json language server: <img width="369" height="429" alt="Image" src="https://github.com/user-attachments/assets/a53e386d-9078-45df-832e-5b33b9523e18" /> <img width="621" height="189" alt="Image" src="https://github.com/user-attachments/assets/791419cc-02b5-44ba-b6d8-97a0f7125421" />
Author
Owner

@rekram1-node commented on GitHub (Oct 8, 2025):

yeah agree ^^

@rekram1-node commented on GitHub (Oct 8, 2025): yeah agree ^^
Author
Owner

@gardner commented on GitHub (Oct 10, 2025):

Yeah, my Cursor / VSCode respect the schema in my config and show code completion hints that I can "select".

I agree that JSON can be really confusing, but in this case I think you'd find it easier to "pick" identifiers if your IDE supported the schema.

@gardner commented on GitHub (Oct 10, 2025): Yeah, my Cursor / VSCode respect the schema in my config and show code completion hints that I can "select". I agree that JSON can be really confusing, but in this case I think you'd find it easier to "pick" identifiers if your IDE supported the schema.
Author
Owner

@rekram1-node commented on GitHub (Oct 10, 2025):

yeah im gonna close this, @SkybuckFlying if u need any help getting a config setup I would love to help, but json is a great, common, and fairly universal way of doing configuration so I will close the issue for now

@rekram1-node commented on GitHub (Oct 10, 2025): yeah im gonna close this, @SkybuckFlying if u need any help getting a config setup I would love to help, but json is a great, common, and fairly universal way of doing configuration so I will close the issue for now
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2008