CoreLayer Docs
Configuration

Model Providers

Configure AI model providers for Jarvis routing.

CoreLayer's Model Gateway routes requests across multiple AI providers. You can configure one or more providers and let Jarvis select the best model for each task.

Supported Providers

The Model Gateway natively supports the following providers through built-in presets:

ProviderIDTypePopular Models
MiMo (Xiaomi)mimoopenai_compatiblemimo-v2.5-pro, mimo-v2.5
Groqgroqopenai_compatiblellama-4-scout, llama-4-maverick, llama-3.3-70b-versatile
DeepSeekdeepseekopenai_compatibledeepseek-v4-pro, deepseek-v4-flash
Anthropicanthropicopenai_compatibleclaude-sonnet-5, claude-fable-5, claude-opus-4.8
Google Geminigoogleopenai_compatiblegemini-3.5-flash, gemini-3.1-flash, gemini-3.1-pro
OpenAIopenaiopenai_compatiblegpt-5.6-sol, gpt-5.6-terra, gpt-5.5, gpt-5.4
Qwen (Alibaba)qwenopenai_compatibleqwen-3.7-max-preview, qwen-3.7-plus-preview, qwen-3.6
OpenRouteropenrouteropenai_compatibleanthropic/claude-sonnet-5, google/gemini-3.5-flash
Ollamaollamaollamallama4, qwen3.5, deepseek-v4

Configuration Files

CoreLayer separates configuration from secrets. Configuration files are stored in the ~/.jarvis/config/ directory.

1. Main Config (config.json)

Defines active providers, model routing rules, and provider endpoints. This file does not contain any API keys:

{
  "version": 1,
  "activeProvider": "mimo",
  "activeModel": "mimo-v2.5-pro",
  "providers": [
    {
      "id": "mimo",
      "name": "MiMo",
      "type": "openai_compatible",
      "baseURL": "https://token-plan-ams.xiaomimimo.com/v1",
      "enabled": true
    },
    {
      "id": "groq",
      "name": "Groq",
      "type": "openai_compatible",
      "baseURL": "https://api.groq.com/openai/v1",
      "enabled": true
    },
    {
      "id": "openrouter",
      "name": "OpenRouter",
      "type": "openai_compatible",
      "baseURL": "https://openrouter.ai/api/v1",
      "enabled": true
    },
    {
      "id": "ollama",
      "name": "Ollama",
      "type": "ollama",
      "baseURL": "http://localhost:11434/v1",
      "enabled": true
    }
  ]
}

2. Credentials Config (credentials.json)

Stores API keys securely, mapping key values to the corresponding provider id:

{
  "mimo": "your_mimo_api_key_here",
  "groq": "your_groq_api_key_here",
  "openrouter": "your_openrouter_api_key_here"
}

Model Routing

When multiple providers are configured, the Model Gateway selects based on:

  • Task complexity — complex reasoning routes to more capable models
  • Latency requirements — time-sensitive requests prefer Groq or local models
  • Cost optimization — routine tasks use cheaper providers
  • Availability — fallback if a provider is down

Environment Variables

You can use environment variables instead of hardcoding API keys:

GROQ_API_KEY=your_groq_api_key_here
OPENROUTER_API_KEY=your_openrouter_api_key_here

Reference them in config:

{
  "apiKey": "${GROQ_API_KEY}"
}

Next Steps

On this page