Skip to content

[Feature Request]: Enhanced Custom Provider Configuration (OpenCode-style) for Global LLM Ecosystem Support #1995

@lucasllin

Description

@lucasllin

Currently, Letta Code primarily relies on interactive CLI commands or environment variables for configuration. While functional, this approach is less ideal for managing complex, multi-model setups—especially when dealing with regional providers like Volcengine Ark that require specific base URLs and multiple model endpoints.

I propose implementing a declarative configuration file (e.g., letta.config.json or .lettarcconfig) that allows users to define providers and models in a structured format, similar to the flexible provider architecture found in OpenCode.

Motivation:

As an engineer managing complex Flutter projects in a WSL environment, I prefer file-based configuration over ephemeral environment variables for several reasons:

  1. Reproducibility: Configuration files can be version-controlled or backed up.
  2. Clarity: It’s easier to define and visualize the relationship between a Provider (e.g., Volcengine) and its multiple models (Kimi, Doubao, DeepSeek).
  3. Elegance: A single JSON file is much cleaner than a long list of export statements in a .zshrc.

Proposed Configuration Structure:

The configuration should allow defining providers as top-level entities, each hosting its own set of models and specific API constraints:

{
  "model": "volcengine/ark-code-latest",
  "providers": {
    "volcengine": {
      "adapter": "openai-compatible",
      "name": "Volcengine Ark",
      "options": {
        "baseURL": "[https://ark.cn-beijing.volces.com/api/coding/v3](https://ark.cn-beijing.volces.com/api/coding/v3)",
        "apiKey": "<YOUR_API_KEY>"
      },
      "models": {
        "ark-code-latest": {
          "context_window": 256000,
          "output_limit": 4096,
          "modalities": ["text", "image"]
        },
        "kimi-k2.6": {
          "context_window": 256000,
          "modalities": ["text", "image"]
        },
        "deepseek-v4-pro": {
          "context_window": 128000
        }
      }
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions