Skip to content

fix(settings): Restore original config when switching to Custom Platform#147

Merged
qin-ctx merged 1 commit intovolcengine:mainfrom
AQIU20:fix_setting
Oct 24, 2025
Merged

fix(settings): Restore original config when switching to Custom Platform#147
qin-ctx merged 1 commit intovolcengine:mainfrom
AQIU20:fix_setting

Conversation

@AQIU20
Copy link
Copy Markdown
Contributor

@AQIU20 AQIU20 commented Oct 23, 2025

fix(settings): Restore original config when switching to Custom Platform

Description :
This PR fixes a bug where switching to Custom Platform retains the modelId from the previous platform instead of displaying the custom configuration fetched from the backend.

Changes :

  • Added originalConfig state to store the original configuration fetched from the backend

  • Modified the useMemo hook to not set modelId when on Custom Platform, preserving the original value

  • Added useEffect to monitor platform switches and restore original configuration when switching to Custom Platform

  • Updated getInfo function to save the original configuration fetched from the backend
    Testing :

  • Verified that switching from Doubao to Custom Platform now correctly displays the custom configuration

  • Verified that switching from OpenAI to Custom Platform now correctly displays the custom configuration

  • Confirmed that switching between Doubao and OpenAI still works as expected
    Issue :
    Fixes [BUG]: Switching to Custom Platform retains modelId from previous platform #146

@qin-ctx qin-ctx merged commit c20b06a into volcengine:main Oct 24, 2025
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.

[BUG]: Switching to Custom Platform retains modelId from previous platform

2 participants