Skip to content

Support file-based configuration (e.g. --config router.yaml) #132

@Mazyod

Description

@Mazyod

We're migrating from the production-stack router to this project and really happy with how lightweight and performant it is. One thing we're missing though is file-based configuration.

The production-stack router supports a --dynamic-config-yaml flag that lets you pass a YAML config file with worker URLs, routing policy, model mappings, etc. This is really useful in production — especially with Docker Swarm configs or Kubernetes ConfigMaps — because it keeps the compose/deployment files clean and the router config versionable on its own.

With the current CLI-only approach, all configuration has to live inline in the container command, which gets unwieldy as the number of workers and options grows.

Since RouterConfig already derives Deserialize, it seems like adding a --config <path> flag that reads and deserializes a JSON/YAML file would be a fairly small change. We'd be happy to contribute a PR for this if you're open to it.

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