Conversation
- Improved the layout and readability of the run details panel by restructuring sections and adding collapsible error views. - Introduced a new `RunErrorSection` component to present run-level errors more clearly, allowing users to toggle raw error details. - Updated the handling of run outputs, step results, and artifacts for better user experience. - Refactored duration calculation in `RunRow` to utilize a dedicated `formatDuration` function for consistency. - Added a new `RunStepResult` interface to improve type safety and clarity in handling step results.
…ation creation - Removed the eligibility gate for model selection in the automation creation process, allowing users to choose models directly in the builder. - Updated the `AutomationBuilderForm` to incorporate model selection logic, ensuring that selected models are validated and preserved during automation creation and editing. - Simplified the `AutomationsContent` and `AutomationNewContent` components by eliminating unnecessary eligibility checks and alerts. - Enhanced the user experience by integrating model selection directly into the automation approval process, ensuring that only billable models are used. - Refactored related tests to cover new model selection behavior and ensure proper validation of user-selected models.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Description
Motivation and Context
FIX #
Screenshots
API Changes
Change Type
Testing Performed
Checklist
High-level PR Summary
This PR refactors the automations model selection architecture to move from a search-space-level eligibility gate to per-automation model pickers. Previously, users needed premium or BYOK models configured at the search-space level before creating any automation. Now, users select models (agent LLM, image, vision) directly when creating or editing automations through new UI pickers that only show eligible options. The backend validation logic shifts from upfront search-space checks to per-automation model validation at create/update time, with the selected models captured in
definition.modelsto insulate runs from future chat model changes. The UI also gets significant run details improvements, rendering step results as readable cards with markdown messages instead of raw JSON, and removing all the old model eligibility warning banners.⏱️ Estimated Review Time: 1-3 hours
💡 Review Order Suggestion
surfsense_backend/app/automations/services/model_policy.pysurfsense_backend/app/automations/services/automation.pysurfsense_backend/app/agents/multi_agent_chat/main_agent/tools/automation/create.pysurfsense_backend/tests/unit/automations/services/test_automation_service_policy.pysurfsense_web/hooks/use-automation-eligible-models.tssurfsense_web/lib/automations/builder-schema.tssurfsense_web/contracts/types/automation.types.tssurfsense_web/app/dashboard/[search_space_id]/automations/components/builder/automation-model-fields.tsxsurfsense_web/app/dashboard/[search_space_id]/automations/components/builder/automation-builder-form.tsxsurfsense_web/components/tool-ui/automation/create-automation.tsxsurfsense_web/app/dashboard/[search_space_id]/automations/automations-content.tsxsurfsense_web/app/dashboard/[search_space_id]/automations/components/automations-empty-state.tsxsurfsense_web/app/dashboard/[search_space_id]/automations/components/automations-header.tsxsurfsense_web/app/dashboard/[search_space_id]/automations/components/automation-model-gate-alert.tsxsurfsense_web/app/dashboard/[search_space_id]/automations/new/automation-new-content.tsxsurfsense_web/lib/automations/run-duration.tssurfsense_web/app/dashboard/[search_space_id]/automations/[automation_id]/components/run-step-result-card.tsxsurfsense_web/app/dashboard/[search_space_id]/automations/[automation_id]/components/run-details-panel.tsxsurfsense_web/app/dashboard/[search_space_id]/automations/[automation_id]/components/run-row.tsx