-
Notifications
You must be signed in to change notification settings - Fork 625
fix: sync tool-call defaults for provider configs #988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdds provider-DB-driven propagation of a model’s boolean tool_call into stored configs’ functionCall when the source is not "user". Adjusts test schemas and cases to validate overlay behavior: provider-sourced configs reflect provider tool_call, user-sourced configs retain user settings even if provider values change. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant UI as UI
participant Presenter as ModelConfig Presenter
participant Store as Stored Config
participant PDB as Provider DB
UI->>Presenter: getFinalStoredConfig()
Presenter->>Store: load stored config
Store-->>Presenter: storedConfig (with source)
alt source != "user"
Presenter->>PDB: load provider info
PDB-->>Presenter: provider + models
Presenter->>Presenter: resolve providerId + model
alt model.tool_call is boolean
Note right of Presenter: Set finalStoredConfig.functionCall = model.tool_call
else model.tool_call unset/non-boolean
Note right of Presenter: Leave functionCall as-is
end
else source == "user"
Note right of Presenter: Preserve user functionCall
end
Presenter-->>UI: finalStoredConfig
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (13)**/*.{js,jsx,ts,tsx}📄 CodeRabbit inference engine (.cursor/rules/development-setup.mdc)
Files:
src/{main,renderer}/**/*.ts📄 CodeRabbit inference engine (.cursor/rules/electron-best-practices.mdc)
Files:
src/main/**/*.ts📄 CodeRabbit inference engine (.cursor/rules/electron-best-practices.mdc)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (.cursor/rules/error-logging.mdc)
Files:
src/main/**/*.{ts,js,tsx,jsx}📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)
Files:
**/*.{ts,tsx,js,vue}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.{ts,tsx,vue}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
src/main/**📄 CodeRabbit inference engine (AGENTS.md)
Files:
src/main/presenter/**📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{js,jsx,ts,tsx,vue}📄 CodeRabbit inference engine (AGENTS.md)
Files:
test/**/*📄 CodeRabbit inference engine (CLAUDE.md)
Files:
test/{main,renderer}/**📄 CodeRabbit inference engine (AGENTS.md)
Files:
test/{main,renderer}/**/*.{test,spec}.ts📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (1)📚 Learning: 2025-09-06T03:07:23.817ZApplied to files:
🧬 Code graph analysis (2)src/main/presenter/configPresenter/modelConfig.ts (1)
test/main/presenter/providerDbModelConfig.test.ts (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68ec879fde2c832c9bb060371eb7700c
Summary by CodeRabbit
Bug Fixes
Tests