mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-25 08:48:13 +02:00
feat: stamp API key into model override at save time to survive global provider change (#362)
* fix: stamp API key into model override at save time to survive global provider change When a workflow overrides the TTS/LLM/STT provider to match the current global config, the override dict only stores model/voice fields, not the API key. If the global config later switches to a different provider, the override can no longer inherit the API key and calls fail. Fix: enrich_overrides_with_api_keys() copies the global provider's API key (and other secret fields) into the override dict at workflow-save time, making the override self-contained regardless of future global config changes. * feat: add test coverage and masking logic --------- Co-authored-by: Abhishek Kumar <abhishek@a6k.me>
This commit is contained in:
parent
8a58b0992d
commit
5b61ad645f
6 changed files with 451 additions and 39 deletions
|
|
@ -495,7 +495,10 @@ export const useWorkflowState = ({
|
|||
throw new Error(msg);
|
||||
}
|
||||
|
||||
setWorkflowConfigurations(configurationsWithDictionary);
|
||||
const savedConfigurations = response.data?.workflow_configurations
|
||||
? (response.data.workflow_configurations as WorkflowConfigurations)
|
||||
: configurationsWithDictionary;
|
||||
setWorkflowConfigurations(savedConfigurations);
|
||||
// Set name directly in the store to avoid setWorkflowName which marks isDirty: true
|
||||
useWorkflowStore.setState({ workflowName: newWorkflowName });
|
||||
logger.info('Workflow configurations saved successfully');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue