← Back to PRs

#20875: feat(gateway): Add /config HTTP endpoint for external dashboards

by abhiramee08b021 open 2026-02-19 11:12 View on GitHub →
gateway size: XS
## Summary Adds a new HTTP endpoint at `/config` that exposes the gateway's agent configuration, enabling external dashboards like OpenClaw Deck to dynamically fetch available models. ## Changes - Added `/config` endpoint in `server-http.ts` - Returns default model (primary + fallbacks) and available models with aliases - Supports CORS for localhost development - Read-only (GET/OPTIONS only) ## Security Considerations - No sensitive data exposed (no tokens, credentials, or personal info) - CORS limited to standard browser security model - Read-only endpoint cannot modify configuration ## Use Case This enables custom dashboards like [OpenClaw Deck](https://github.com/kellyclaudeai/openclaw-deck) to dynamically fetch models from the gateway instead of relying on hardcoded values, ensuring the UI always matches the gateway configuration. <!-- greptile_comment --> <h3>Greptile Summary</h3> Added a new unauthenticated `/config` HTTP endpoint that exposes the gateway's agent model configuration (primary/fallback models and model catalog with aliases) to enable external dashboards to dynamically fetch available models. - Endpoint is read-only (GET/OPTIONS) with CORS enabled (`Access-Control-Allow-Origin: *`) - Returns only `agents.defaults.model` and `agents.defaults.models` from config (no sensitive data) - No authentication required, which aligns with the intended use case for external dashboards - Implementation follows existing patterns in `server-http.ts` for route handling <h3>Confidence Score: 4/5</h3> - This PR is safe to merge with minimal risk - it adds a simple read-only endpoint that exposes only non-sensitive model configuration data - The implementation is straightforward and exposes only model names/aliases (no credentials or sensitive data). The lack of authentication is intentional for external dashboard integration. Main concern is missing tests, but the logic is simple and follows existing patterns in the codebase. - No files require special attention <sub>Last reviewed commit: f16925f</sub> <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs