Skip to content

Continuous enhancement: Quantamental AI model selection - #1

Open
ryun6249 wants to merge 7 commits into
masterfrom
automation/continuous-enhancement-20260519-0920
Open

Continuous enhancement: Quantamental AI model selection#1
ryun6249 wants to merge 7 commits into
masterfrom
automation/continuous-enhancement-20260519-0920

Conversation

@ryun6249

Copy link
Copy Markdown
Owner

Continuous Enhancement Report

1. Current Status

  • Project purpose: FastAPI-served local financial research workstation for market, macro, Quant Lab, Quantamental, ML Forecast, AI Portfolio, and grounded AI briefing workflows.
  • Existing structure preserved: yes. Static app/web UI, /api/v1/config, Quantamental API contracts, deterministic default analysis, and existing All/quality/range behavior are preserved.
  • Main issues found: Quantamental AI report/Q&A had backend support for model and use_llm, but the UI always sent deterministic requests and did not expose truthful Qwen/Gemma runtime-checked selection.

2. Changes Made

Compatibility

  • Added model metadata to existing config model options without removing existing fields.
  • Kept deterministic Quantamental analysis as the default initial path.

Data Consistency

  • No market data schema or calculation behavior changed.
  • Existing global range and quality summaries were preserved.

UI/UX

  • Added a Quantamental AI 모델 selector in the analysis report card.
  • Shows deterministic default plus Qwen/Gemma runtime-checked options from /api/v1/config.
  • Added responsive styling and bundle cache-bust version 20260519-continuous-enhancement-v3.

Visualization

  • No chart renderer changes in this slice.
  • Browser smoke re-verified Quantamental overview axes and mobile overflow.

AI Briefing

  • Explicit AI report/Q&A actions now send use_llm=true and the concrete configured model only when a runtime-checked model is selected.
  • Deterministic fallback remains active if local provider execution fails.

Translation

  • Added Korean/English status copy that does not claim Qwen/Gemma are installed before runtime verification.

Performance

  • No background LLM calls, polling, or additional dashboard fetch loops were added.

Tests / Validation

  • Added API/UI contract coverage for runtime-checked model metadata and model selector markers.

3. Changed Files

File Change Reason
app/api/routers/system.py Add concrete model field to UI model options Avoid inferring model names from labels
app/web/index.html Add Quantamental AI model selector/status Let users choose deterministic/Qwen/Gemma truthfully
app/web/app.js Render model options and wire AI report/Q&A payloads Apply selection only to explicit AI actions
app/web/styles.css Responsive selector layout Avoid desktop/mobile overflow
scripts/check_ui_contract.py Add UI/JS contract markers Prevent regression
scripts/ai_portfolio_ui_smoke.py Bump app bundle version Match cache-busted UI
tests/test_api_routing_contract.py Assert runtime-checked model metadata Verify model selection is not fake
tests/test_ui_routing_contract.py Assert selector, CSS, and payload wiring markers Verify static UI contract
docs/CONTINUOUS_ENHANCEMENT_LOG.md Record analysis, implementation, validation Keep automation log current

4. Validation Results

Check Command / Tool Result Notes
Lint git diff --check -- ... Passed No whitespace errors in touched files
Build node --check app/web/app.js; python -m py_compile app/api/routers/system.py scripts/check_ui_contract.py scripts/ai_portfolio_ui_smoke.py Passed Repo has no npm/pnpm package build
Test python -m pytest -q Passed 691 passed, 9 subtests passed in 140.47s
UI validation Quantamental + AI Portfolio Playwright/browser smoke Passed AI Portfolio passed on standalone retry after parallel Macro timeout
Data validation python scripts/check_ui_contract.py; Quantamental browser smoke Passed Quality/range and Quantamental surfaces still present
AI briefing validation tests/test_quantamental_api.py, tests/test_quantamental_ui_ai_panel.py, Playwright intercepted POST Passed Qwen selection sends use_llm=true, model=qwen2.5:7b

5. Remaining Risks

  • Qwen/Gemma options are runtime-checked, not preflight-proven installed models.
  • Local provider failure remains intentionally handled by deterministic fallback.
  • The worktree had unrelated dirty files before this run; this PR only stages the files listed above.

6. Next Enhancement Suggestions

  1. Add a lightweight provider health indicator beside the Quantamental model selector.
  2. Add the same explicit model selection pattern to Macro/Forecast AI surfaces where backend contracts support it.
  3. Normalize enhancement-log appending to avoid duplicated historical sections during repeated automation runs.

7. Safety Notes

  • main/master was not modified directly.
  • Auto-merge was not enabled.
  • Secrets were not touched.
  • Trading/order execution logic was not modified.
  • Unsupported facts were not presented as verified.

@ryun6249 ryun6249 added the enhancement New feature or request label May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant