feat: improve MySQL compatibility and streamline model provider configuration#1135
feat: improve MySQL compatibility and streamline model provider configuration#1135lyj715824 merged 87 commits intoiflytek:mainfrom
Conversation
chore: astron-agent compatible with mysql
- Limit model provider dropdown to three main options: Anthropic, OpenAI, and Google - Created provider grouping utilities to map specific providers to main vendors - Updated modal components to use simplified provider selection - Maintained official model page with detailed provider cards - Updated filtering logic to work with vendor groupings - Added grouped provider cards component for better UX
fixSimplify Model Provider Selection to Three Main Vendors (Anthropic, OpenAI, Google)
- Restore ProviderLogoGlyph and ProviderLogoBadge components that were accidentally removed - Restore visibleCards filtering logic with proper vendor mapping - Add missing image imports for provider logos - Maintain vendor grouping functionality for provider filtering
fix: restore missing components and logic in official model page
- Change left sidebar filter from 'vendor' to 'specific models' (ChatGPT, MiniMax, etc.) - Update filtering logic to work with specific model providers - Keep 3 main vendor options (OpenAI, Anthropic, Google) in configuration modal - Simplify vendor names to 'OpenAI' instead of 'OpenAI Compatible' - Update internationalization for 'Model Filter' instead of 'Vendor Filter'
feat: update model selection UI to show specific models in sidebar
…ial page - Revert use-model-filters.ts to its original state to avoid breaking other pages - Implement model-specific filtering logic directly in official model page - Official model page now properly filters by specific provider options - Keep all other improvements to UI and component logic
fix: revert shared filter hook and use model-specific filter in offic…
chore: chore: database project optimize mysql compatibility and add logs
- Create local state for provider filter and search in official model page - Prevent official model page filters from affecting global model filtering - Keep the correct filtering logic for specific provider options in sidebar - Maintain separation between official model page and personal model page states
fix: isolate official model page filters from global state
chore: backend project optimized for mysql
- Remove unused GroupedProviderCards import - Correct import statement to use getSpecificProviderOptions instead of getVendorOptions - Ensure all imported functions are actually used in the component
cleanup: remove unused import and fix import statement
chore: database project optimized for dml
fix: Modify OSS link
chore: database project static code analysis optimization
fix: resolve flyway migration conflict and implement multimodal input…
feat: add multimodal input handling with input_to_filetype_map
- Add multiMode field to ModelCreateParams interface - Update buildSubmitParams to include multiMode in API requests - Add multiMode field to LocalModelParams interface - Update handleLocalModelSubmit to include multiMode in local model requests - These changes ensure the multiMode field is properly sent in model creation/update requests to prevent API validation error 8901
fix(model): include multiMode field in model creation requests
- Make multimedia section dynamically show only when model has multimodal capability - Update multimedia section UI to match input section styling and functionality - Allow users to customize parameter names in multimedia inputs - Add placeholder translation for multimedia parameter names - Ensure proper detection of multimodal capability from selected model - Fix model editing form to load multiMode field from existing model
fix(workflow): make multimedia section conditional and improve UX
fix(workflow): remove redundant check and ensure multimedia section v…
fix: Add new database migration
fix: Add new database migration
- Update isThinkModel detection to check selected model's isThink property - Ensure multimedia section shows based on selected model's multiMode property - Improve model capability detection in useNodeCommon hook - Fix both REASONING_CONTENT output and multimedia input visibility
fix(workflow): properly detect model capabilities for UI display
- Add isThink and multiMode properties when constructing LLMInfoVo in dealWithSelfModel - These properties are needed for frontend to properly detect model capabilities - Fixes issue where REASONING_CONTENT output and multimedia input weren't showing
fix(backend): include isThink and multiMode properties in model info
fix: Add new database migration
fix: Workflow import is not displayed in the Agent Plaza
fix: Modify variable reference issue
|
yjlu12 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
There was a problem hiding this comment.
Code Review
This pull request refactors the system to support multiple database dialects (PostgreSQL and MySQL) through an adapter pattern, affecting SQL generation, migrations, and core database services. It also migrates Anthropic and Google LLM integrations to their official SDKs, adds multimodal support for models, and improves frontend request handling with AbortControllers. Significant feedback was provided regarding critical SQL injection vulnerabilities in the new database adapters' creation logic. Additionally, the bot deletion implementation was noted for failing to account for the success of all sub-operations, which may cause data inconsistency.
| result = await conn.execute( | ||
| text( | ||
| "SELECT 1 FROM information_schema.SCHEMATA " | ||
| "WHERE SCHEMA_NAME = :db_name" | ||
| ), | ||
| {"db_name": db_name}, | ||
| ) | ||
| exists = result.scalar() | ||
| if not exists: | ||
| await conn.execute( | ||
| text( | ||
| f"CREATE DATABASE `{db_name}` " | ||
| f"CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci" | ||
| ) | ||
| ) | ||
| logger.info(f"Database '{db_name}' created successfully") |
There was a problem hiding this comment.
The create_database_if_not_exists method uses text to execute a raw SQL string containing a database name. While db_name is passed as a parameter, the CREATE DATABASE statement itself is constructed using f-string interpolation. This is vulnerable to SQL injection if db_name is not strictly validated before this call.
| ) | ||
| exists = result.scalar() | ||
| if not exists: | ||
| await conn.execute(text(f'CREATE DATABASE "{db_name}"')) |
| log.info("No chat_bot_market rows updated during bot deletion, botId={}, uid={}", botId, uid); | ||
| } | ||
|
|
||
| return baseDeleted; |
There was a problem hiding this comment.
The method returns baseDeleted but ignores the success status of the other deletion operations. If deleteChatBotList, deleteChatList, or deleteChatBotMarket fail, the method still returns true as long as deleteChatBotBase succeeds. This could lead to inconsistent data states. Consider returning a combined result or throwing an exception if critical deletions fail.
Summary
This PR consolidates a series of backend, database, workflow, and frontend updates focused on two major areas:
It also includes several follow-up fixes for release content, links, locale wording, SDK deprecation handling, and
page interaction issues.
Main Changes
MySQL compatibility and infrastructure
Model provider and model selection improvements
SDK and integration updates
Additional fixes and cleanup
OpenAIinstead ofOpenAI CompatibleImpact
These changes improve database compatibility for MySQL-based deployments, make model provider configuration clearer
and more maintainable, and fix several UI and integration issues affecting official model management and external SDK
usage.
Notes
This PR includes merged changes from multiple feature and bugfix branches and serves as an aggregated integration
update.