diff --git a/python/configs/providers/openrouter.yaml b/python/configs/providers/openrouter.yaml index 2f89555ec..27e76d08f 100644 --- a/python/configs/providers/openrouter.yaml +++ b/python/configs/providers/openrouter.yaml @@ -38,7 +38,7 @@ models: - id: "google/gemini-3-pro-preview" name: "Gemini 3 Pro Preview" - id: "x-ai/grok-4.1-fast" - name: "Grok 4.1 Fast(free)" + name: "Grok 4.1 Fast" # ============================================ # Embedding Models Configuration diff --git a/python/valuecell/server/api/routers/strategy_agent.py b/python/valuecell/server/api/routers/strategy_agent.py index fc3133590..ec0aa6ac3 100644 --- a/python/valuecell/server/api/routers/strategy_agent.py +++ b/python/valuecell/server/api/routers/strategy_agent.py @@ -14,6 +14,7 @@ StrategyStatus, StrategyStatusContent, StrategyType, + TradingMode, UserRequest, ) from valuecell.config.loader import get_config_loader @@ -73,6 +74,15 @@ def _safe_config_dump(req: UserRequest) -> dict: request.trading_config.initial_free_cash = ( request.trading_config.initial_capital ) + if ( + request.exchange_config.trading_mode == TradingMode.VIRTUAL + and request.exchange_config.exchange_id not in {None, ""} + ): + logger.warning( + "Virtual trading requested on non-default exchange_id '{}'. Ensure this is intended.", + request.exchange_config.exchange_id, + ) + request.exchange_config.exchange_id = None # Ensure we only serialize the core UserRequest fields, excluding conversation_id user_request = UserRequest( llm_model_config=request.llm_model_config,