feat(polymarket): expose edge + spread gate knobs via ChatUI#1000
Closed
jmoreira-valory wants to merge 1 commit into
Closed
feat(polymarket): expose edge + spread gate knobs via ChatUI#1000jmoreira-valory wants to merge 1 commit into
jmoreira-valory wants to merge 1 commit into
Conversation
Follow-up to #999. Makes the two Polymarket bet-selection gates tunable at runtime via the chat UI, in addition to env config. Defaults unchanged (no-op). Both knobs become ChatuiConfig fields (None = keep the existing default), exposed in the chat LLM prompt and validated in the handler, gated on is_running_on_polymarket (CLOB-only -> Polymarket trader only; Omen untouched). Each stays in its semantic home: - edge band (min_edge/max_edge): strategy input -> bridged into strategies_kwargs in decision_maker_abci base.set_chatui_values - spread band (min_spread/max_spread): post-strategy gate -> read in decision_receive with fallback to the polymarket_spread_* params No FSM change. 4182 tests pass; lint + packages lock + check-hash clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Author
|
Deprioritized. |
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.
Summary
Follow-up to #999. Makes the two Polymarket bet-selection gates tunable at runtime via the chat UI, in addition to env config. Both still default to no-op — nothing changes unless an operator sets a value.
Design
Both knobs become
ChatuiConfigfields (None= keep the existing default), exposed in the chat LLM prompt and validated in the handler — gated onis_running_on_polymarket(the gates are CLOB-only, so they're offered only on the Polymarket trader;trader_pearl/Omen is untouched).Each knob stays in its semantic home (deliberately not crammed into a shared
strategies_kwargs):min_edge/max_edgestrategies_kwargsindecision_maker_abci/behaviours/base.py::set_chatui_values— same path asmax_bet_sizemin_spread/max_spreaddecision_receive.pywith fallback to the existingpolymarket_spread_*paramsSo the operator tunes both the same way (one chat surface), while internally each lives where it belongs and no strategy contract is touched.
Changes
chatui_abci:models.py(+4ChatuiConfigfields),prompts.py(Polymarket-only gate section in the LLM template),handlers.py(typed config + validation: numeric,0 <= min <= max <= 1, clearable viaremoved_config_fields).decision_maker_abci:base.py(edge bridge),decision_receive.py(spread chatui-with-fallback).Testing
autonomy packages lock+check-hashclean.Stacked on
feat/polymarket-bet-selection-gates(#999).🤖 Generated with Claude Code