Skip to content

feat: Add AI model configuration settings (Phase 3.4)#26

Open
Datakult0r wants to merge 8 commits into
devin/1768448452-session9-pages-datafrom
devin/1769292239-ai-model-config
Open

feat: Add AI model configuration settings (Phase 3.4)#26
Datakult0r wants to merge 8 commits into
devin/1768448452-session9-pages-datafrom
devin/1769292239-ai-model-config

Conversation

@Datakult0r
Copy link
Copy Markdown
Owner

Summary

Adds a settings page for configuring which AI models power each agent role in the research pipeline. Users can choose from three quality presets (Low-Cost FREE, Balanced $3.50, Premium $7) or customize individual agent models in advanced mode.

Backend (296 lines): New /api/settings routes with endpoints for listing models, presets, current config, updating settings, cost estimation, and reset.

Frontend (427 lines): New /settings page with preset cards, cost estimation display, advanced per-agent configuration, and cost breakdown visualization.

Review & Testing Checklist for Human

  • Critical: Settings not integrated with research pipeline - The settings are stored but I did not verify they are consumed by researchService.js or agent_models.py. Check if changing presets actually affects which models are used during research.
  • Security: Settings endpoints are unprotected - All /api/settings/* routes have no authentication. Decide if model configuration should require auth to prevent unauthorized cost increases.
  • Persistence: In-memory storage only - Settings use let currentSettings = {...} and reset on server restart. For production, migrate to Supabase storage.
  • Test UI flow - Navigate to /settings, select each preset, toggle advanced mode, change individual agent models, save, and verify the configuration persists (until server restart).

Recommended test plan:

  1. Start backend and frontend locally
  2. Navigate to /settings
  3. Verify three preset cards render with correct costs
  4. Click each preset and verify selection indicator appears
  5. Toggle "Advanced" and verify per-agent dropdowns appear
  6. Change a model, verify cost estimate updates
  7. Click Save, refresh page, verify selection persisted

Notes

Link to Devin run: https://app.devin.ai/sessions/9573820f0f6d41dab1cff8a61c26c981
Requested by: @Datakult0r

- Added Dockerfile for containerized deployment
- Added fly.toml with Fly.io configuration
- Added .dockerignore to exclude unnecessary files
- Added comprehensive DEPLOYMENT.md guide
- Created backend settings API routes:
  - GET /models - List available AI models with capabilities and costs
  - GET /presets - Get quality presets (low-cost, balanced, premium)
  - GET /current - Get current configuration with cost estimate
  - POST /update - Update configuration (preset or custom models)
  - POST /estimate - Estimate cost for a configuration
  - POST /reset - Reset to low-cost mode
- Created frontend settings page with:
  - Quality preset selection (Low-Cost FREE, Balanced $3.50, Premium $7)
  - Cost estimation display (total cost, tokens, agents, phases)
  - Advanced mode for per-agent model customization
  - Cost breakdown by agent role
  - Save/Reset functionality with loading states
- Updated server.js to include settings routes
@devin-ai-integration
Copy link
Copy Markdown
Contributor

Original prompt from Datakult
https://github.com/Datakult0r/ai-grant-crawler-a2a-pro
index this

@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
ai-grant-crawler-a2a-pro Error Error Jan 25, 2026 9:00pm

@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 24, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant