merge: resolve conflicts from origin/dev into PR #1495

- Use PR branch (dev-nofxi) as authority for agent/ module code
- Merge dev's newer model names (MiniMax-M2.7, deepseek-v4-flash)
  with PR's blockrun provider entries
- Fix duplicate agent init in main.go, keep defer-based Stop()
- Fix var type bug in store/ai_model.go (model → models)
- Remove dev-only test files incompatible with PR's evolved agent code
  (to be re-synced after merge)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
shinchan-zhai
2026-05-11 16:52:04 +08:00
parent ca8bed4a58
commit 32e8a03a85
20 changed files with 2861 additions and 86 deletions

View File

@@ -147,7 +147,7 @@ func (s *AIModelStore) GetDefault(userID string) (*AIModel, error) {
func (s *AIModelStore) firstEnabledUsable(userID string) (*AIModel, error) {
var models []AIModel
err := s.db.Where("user_id = ? AND enabled = ?", userID, true).
err := s.db.Where("user_id = ? AND enabled = ? AND api_key != ''", userID, true).
Order("updated_at DESC, id ASC").
Find(&models).Error
if err != nil {