#20875: feat(gateway): Add /config HTTP endpoint for external dashboards
gateway
size: XS
Cluster:
UI and Model Management Enhancements
## 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
#8522: feat(control-ui): Add Model Requests panel for real-time API monito...
by GiantAxeWhy · 2026-02-04
75.9%
#16988: fix: always regenerate models.json from gateway config
by MisterGuy420 · 2026-02-15
73.8%
#8546: Fix/config UI improvements
by RandomRaine · 2026-02-04
73.6%
#9064: fix: validate model references against catalog in config.set/patch/...
by joetomasone · 2026-02-04
73.5%
#21882: feat(gateway): filter models.list by agents.defaults.models allowlist
by kckylechen1 · 2026-02-20
73.3%
#9163: Fix: Save Anthropic setup token to config file
by vishaltandale00 · 2026-02-04
72.7%
#4462: fix: prevent gateway crash when all auth profiles are in cooldown
by garnetlyx · 2026-01-30
72.5%
#19020: bugfix(gateway): Handle invalid model provider API config gracefully\…
by funkyjonx · 2026-02-17
72.4%
#6512: Claude/setup open claw agent f v sqk
by franelcisco · 2026-02-01
72.2%
#18988: feat(config): add support for config warnings and improve validation
by saurav470 · 2026-02-17
71.7%