fix: beta trading pipeline — max_tokens default, approval re-enqueue, credentials
- Migration 031: change ai_agents/agent_variants max_tokens default from 32768 to 4096 (32768 exceeds vLLM context window, causing HTTP 400 on every extraction) - API: re-enqueue approved orders to broker queue — previously approved orders sat in DB with nothing to execute them - values-beta: enable TRADING_ENABLED, update Alpaca paper keys
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
-- Fix max_tokens default: 32768 is the full context window, not a reasonable
|
||||
-- output limit. vLLM rejects requests where max_tokens >= context_window
|
||||
-- because there's no room left for the input prompt.
|
||||
--
|
||||
-- Change the column default to 4096 (sufficient for structured JSON extraction
|
||||
-- output) and update any existing rows still at the old default.
|
||||
|
||||
ALTER TABLE ai_agents ALTER COLUMN max_tokens SET DEFAULT 4096;
|
||||
ALTER TABLE agent_variants ALTER COLUMN max_tokens SET DEFAULT 4096;
|
||||
|
||||
UPDATE ai_agents SET max_tokens = 4096, updated_at = NOW()
|
||||
WHERE max_tokens = 32768;
|
||||
|
||||
UPDATE agent_variants SET max_tokens = 4096
|
||||
WHERE max_tokens = 32768;
|
||||
Reference in New Issue
Block a user