Skip to content
This repository was archived by the owner on Jun 2, 2026. It is now read-only.
This repository was archived by the owner on Jun 2, 2026. It is now read-only.

[Feature] Give us an API hook for MCP servers to switch the session's AI model #873

@iandouglas

Description

@iandouglas

I'm working on an idea to create an MCP server that allows users to switch to a preferred LLM based on the prompt they type. This would require an API hook of some kind into Void to change the LLM for that session. (this might get complicated if I have several Void editors open?)

If I were to write a prompt like help me write some Python code to ... then that API hook would allow the MCP to change that session's LLM to my preferred coding LLM.

Later if I say "write me a blog post about this project," the MCP server could switch to my preferred LLM for writing.

There's obviously some complexity to work out for when to keep using the previous LLM choice or when to switch, or when to use a "fallback" LLM if nothing else matches, but you get the idea :)

{
  "coding": {
    "keywords": ["software", "development"],
    "provider": "Anthropic",
    "model": "claude-sonnet-4"
  },
  "writing": {
    "keywords": ["story", "blog", "poem"],
    "provider": "OpenAI",
    "model": "gpt-4.1"
  },
  "**FALLBACK**": {
    "provider": "Google",
    "model": "gemini-flash-lite"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions