Skip to content

config.yaml is re-parsed on every call and has no validation #76

Description

@GoodbyePlanet

Impact: Medium (correctness + performance)

`server/config.py:10-24, 116-130`:

  • `ServiceConfig` is hand-rolled (not Pydantic); malformed YAML raises a raw `KeyError` on `svc["name"]`.
  • No duplicate-service-name check — duplicates silently share the `service` payload namespace.
  • `load_services()` re-parses the YAML file on every call. It is invoked in ~6 places, including per-request tool paths (`server/tools/search.py:189`, `admin.py:47`, and both pipelines).

Recommended change

Make `ServiceConfig` a validated Pydantic model (with a duplicate-name check) and cache the parsed result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions