feat(connectors): expose config field prompts in the config-map endpoint - #223
Merged
Merged
Conversation
The Hummingbot config maps carry a human readable prompt per field, but
/connectors/{connector}/config-map only returned the type and whether the
field was required, so clients had to invent their own labels.
Prompts live in json_schema_extra either as a plain string or as a callable
taking the config map, so callables are resolved before being returned and a
failing one just omits the key instead of breaking the endpoint.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HbBYBEcgRVGXiZiq7kLDBv
Greptile SummaryThe PR extends connector configuration-map responses with human-readable prompts resolved from Hummingbot field metadata, while preserving existing type, required, and allowed-value information.
Confidence Score: 5/5The PR appears safe to merge with no concrete blocking or independently actionable non-blocking issues identified. The prompt metadata is added conditionally, callable failures are isolated, and existing configuration-map fields remain unchanged.
|
| Filename | Overview |
|---|---|
| services/unified_connector_service.py | Adds guarded prompt extraction and callable resolution to connector configuration-map serialization; no actionable defect was established. |
| routers/connectors.py | Documents the expanded response metadata and performs whitespace-only cleanup elsewhere. |
Reviews (1): Last reviewed commit: "feat(connectors): expose config field pr..." | Re-trigger Greptile
david-hummingbot
approved these changes
Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
GET /connectors/{connector_name}/config-mapnow returns the human readablepromptthat Hummingbot already defines for each credential field, alongside the existingtype/required/allowed_values.Before, clients had to invent their own labels for connector credential forms.
How
Prompts live in each field's
json_schema_extra, either as a plain string (e.g.binance_perpetual,pacifica_perpetual) or as a callable taking the config map (e.g.binanceuses lambdas)._resolve_field_prompthandles both and simply omits the key if resolving one raises, so a misbehaving connector can't break the endpoint.Example
GET /connectors/pacifica_perpetual/config-map{ "pacifica_perpetual_agent_wallet_public_key": { "type": "SecretStr", "required": true, "prompt": "Enter your Pacifica Perpetual Agent Wallet Public Key" }, "pacifica_perpetual_api_config_key": { "type": "SecretStr", "required": false, "prompt": "Enter your Pacifica Perpetual API Config Key (optional)" } }Testing
Ran the config map against
pacifica_perpetual,binance(callable prompts),krakenandhyperliquid_perpetual(Literal field, keepsallowed_valuesnext to the prompt) — all resolve correctly.Also stripped pre-existing trailing whitespace in
routers/connectors.py(the flake8 pre-commit hook fails on the file otherwise) and documentedprompt+allowed_valuesin the endpoint docstring so they show in the OpenAPI schema.🤖 Generated with Claude Code
https://claude.ai/code/session_01HbBYBEcgRVGXiZiq7kLDBv