Skip to content

fix(workflows): restore agent runtime model selection on sessions - #81

Merged
artempartos merged 1 commit into
developfrom
fix/workflow-preferred-model-select
Aug 11, 2026
Merged

artempartos merged 1 commit into
developfrom
fix/workflow-preferred-model-select

Conversation

@dvislov

@dvislov dvislov commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • The Workflow Builder redesign (Report a failed run back to the Slack thread that started it #212) rewrote the session editor into SessionEditorPanel.tsx and dropped the "Preferred Model" select in the process — it never carried preferredModel in the local Step type or received agentModels as a prop, so the model picker for a session's agent runtime silently disappeared (reported: "в настройках воркфлоу пропала возможность выбрать модель у agent runtime").
  • The backend (preferred_model column, StepResource, SessionService, workflow duplicator, meta-tools) was untouched — this was a pure frontend regression.
  • Restored the "Preferred Model" select in SessionEditorPanel.tsx, shown once an Execution Environment is chosen, scoped to that runtime's models via agentModels, and cleared when the runtime changes — matching pre-redesign behavior.
  • Wired agentModels from BuilderPage.tsx into SessionEditorPanel.

Test plan

  • docker compose exec -T web make check_all green (backend + frontend, rebased onto latest develop)
  • Added regression test in BuilderPage.test.tsx covering selecting a Preferred Model PATCHes preferredModel
  • Manually verified existing runtime-reset test still passes with the new select present

🤖 Generated with Claude Code

The builder redesign (#212) rewrote the session editor into
SessionEditorPanel.tsx but dropped the Preferred Model select and
never carried preferredModel/agentModels through, so the model picker
for a session's agent runtime silently disappeared even though the
backend still fully supports it.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Signed-off-by: Dmitry Vislov <[email protected]>
@dvislov dvislov self-assigned this Aug 11, 2026
@dvislov
dvislov requested a review from artempartos August 11, 2026 10:23
@artempartos
artempartos merged commit 03ea4de into develop Aug 11, 2026
7 checks passed
Evgeniy-DB added a commit that referenced this pull request Oct 14, 2026
First two building blocks of the Flow -> Aixle Insights usage export
(design: docs/design/aixle-insights-usage-export.md).

Settings (Task 1):
- Settings.aixle_insights block: deployment-wide enabled kill switch,
  collector base_url, timeouts, batch_size. No token here -- the ingest
  token is per-company (a later Integration-based task).
- base_url defaults per environment in production.yml and staging.yml
  (both define the key so settings_parity_test still matches).
- .env.example documents the AIXLE_INSIGHTS_* knobs.

Export ledger (Task 5):
- insights_usage_exports table + InsightsUsageExport model: one row per
  terminal session, states pending/exported/failed/skipped, unique index
  on terminal_session_id for idempotent claiming, denormalized company_id
  (nullify) for per-company diagnostics, REPLAY_WINDOW = 7.days mirroring
  Insights' attribution lookback.
- Factory and model tests (states, unique index, settle methods, scopes).

Signed-off-by: Evgeniy Yagnenkov <[email protected]>
Evgeniy-DB added a commit that referenced this pull request Oct 14, 2026
Task 1b of the Flow -> Aixle Insights usage export
(design: docs/design/aixle-insights-usage-export.md).

Multitenant link: a company admin connects the company to its own Insights
organization by pasting that org's ingest token. Stored on a company-wide
Integration row (provider aixle_insights, project_id nil), encrypted in
credentials; shown in the integrations list and removable only by a company
admin, like the company-wide Slack install.

- Integration: aixle_insights provider + CONNECTABLE_PROVIDERS,
  insights_ingest_token reader, Integration.aixle_insights_for(company).
- AixleInsights::IntegrationService#connect: find_or_initialize the one
  company-wide row and store the token, active on save. Accept-on-save --
  the collector returns 200 even for a bad token, so validity is observed
  on first sync, not probed here. Reconnect replaces the token in place.
- IntegrationsController#create dispatch + create_aixle_insights, gated on
  the same company-admin predicate as the company-wide destroy path.
- IntegrationResource exposes only a non-secret insights_connected flag;
  the token never reaches the browser.
- Minimal React connect card (token PasswordInput) in IntegrationsContent.
- Model/service/controller/resource/frontend tests.

Signed-off-by: Evgeniy Yagnenkov <[email protected]>
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.

2 participants