Skip to content

feat: improve MySQL compatibility and streamline model provider configuration#1135

Merged
lyj715824 merged 87 commits intoiflytek:mainfrom
lyj715824:bugfix/superteam
Apr 2, 2026
Merged

feat: improve MySQL compatibility and streamline model provider configuration#1135
lyj715824 merged 87 commits intoiflytek:mainfrom
lyj715824:bugfix/superteam

Conversation

@lyj715824
Copy link
Copy Markdown
Contributor

Summary

This PR consolidates a series of backend, database, workflow, and frontend updates focused on two major areas:

  1. Improving MySQL compatibility across database, backend, workflow, and Docker-related modules
  2. Simplifying and stabilizing model provider selection, configuration, and related UI behavior

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

  • Updated database project to improve MySQL compatibility
  • Optimized backend and workflow projects for MySQL support
  • Adjusted Docker configuration for the MySQL-related deployment scenario
  • Added logs and applied static code analysis optimizations
  • Improved DML-related database handling

Model provider and model selection improvements

  • Simplified model provider selection to three main vendors
  • Updated model provider enums and related dependencies
  • Refined model selection UI to display specific models in the sidebar
  • Allowed model provider selection in the official model config modal
  • Removed references to deprecated model provider enum values
  • Isolated official model page filters from global state
  • Reverted shared filter hook usage and restored model-specific filtering
  • Restored missing components and logic in the official model page

SDK and integration updates

  • Enhanced readability of Anthropic and Google SDK implementations
  • Updated Google GenAI SDK to handle deprecation-related changes

Additional fixes and cleanup

  • Updated locale text to use OpenAI instead of OpenAI Compatible
  • Fixed repeated interface call issues
  • Modified release copy
  • Fixed OSS link issues
  • Added WeChat Work QR code
  • Removed unused imports and corrected import statements

Impact

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.

sharphu and others added 30 commits March 20, 2026 09:35
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
chore: database project static code analysis optimization
Kexinist and others added 27 commits March 26, 2026 16:43
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…
- 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: Workflow import is not displayed in the Agent Plaza
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 4 committers have signed the CLA.

✅ Kexinist
❌ sharphu
❌ lyj715824
❌ yjlu12


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.

@lyj715824 lyj715824 merged commit e37dbaa into iflytek:main Apr 2, 2026
20 of 30 checks passed
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +162 to +177
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")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-critical critical

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}"'))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-critical critical

The create_database_if_not_exists method uses f-string interpolation for the database name in the CREATE DATABASE statement. This is vulnerable to SQL injection. Use parameterized queries or ensure the database name is strictly validated.

log.info("No chat_bot_market rows updated during bot deletion, botId={}, uid={}", botId, uid);
}

return baseDeleted;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

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.

4 participants