litellm - 💡(How to fix) Fix [Feature]: `config.yaml`'s JSON Schema [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#23022Fetched 2026-04-08 00:38:50
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
1
Author
Participants
Timeline (top)
labeled ×2commented ×1subscribed ×1

Code Example

# yaml-language-server: $schema=https://litellm.ai/schema.json

models:
  # ...
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

The Feature

I need a JSON schema for the config YAML so that I can fill in my config. This would enable my IDE to make sure I do not make mistakes or use fields that don't exist.

Bifrost has something like this: https://www.getbifrost.ai/schema

# yaml-language-server: $schema=https://litellm.ai/schema.json

models:
  # ...

Motivation, pitch

This ensures correctness in the config.yaml file before it reaches the server.

What part of LiteLLM is this about?

Proxy

LiteLLM is hiring a founding backend engineer, are you interested in joining us and shipping to all our users?

No

Twitter / LinkedIn details

No response

extent analysis

Fix Plan

To create a JSON schema for the config YAML, we can use existing tools and libraries. Here are the steps:

  • Define the schema using a tool like json-schema or a visual editor.
  • Host the schema file on a publicly accessible URL.
  • Update the YAML file to reference the schema using the $schema keyword.

Example Code

Here's an example of what the JSON schema might look like:

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "LiteLLM Config",
  "type": "object",
  "properties": {
    "models": {
      "type": "object",
      "properties": {
        // add properties for models here
      }
    }
  },
  "required": ["models"]
}

And here's how you might reference it in your YAML file:

# yaml-language-server: $schema=https://litellm.ai/schema.json

models:
  # ...

Make sure to replace https://litellm.ai/schema.json with the actual URL where your schema file is hosted.

Verification

To verify that the fix worked, try the following:

  • Open your YAML file in an IDE that supports JSON schema validation (e.g. Visual Studio Code).
  • Make sure the IDE is configured to use the $schema keyword to validate the YAML file.
  • Try adding an invalid field or value to the YAML file and see if the IDE reports an error.

Extra Tips

  • Use a tool like ajv to validate your JSON schema and ensure it's correct.
  • Consider using a library like js-yaml to parse and validate your YAML file in your backend code.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

litellm - 💡(How to fix) Fix [Feature]: `config.yaml`'s JSON Schema [1 comments, 2 participants]