Skip to content

feat(workflow): support agent generated tool parameters#7267

Draft
FinleyGe wants to merge 12 commits into
labring:mainfrom
FinleyGe:codex/agent
Draft

feat(workflow): support agent generated tool parameters#7267
FinleyGe wants to merge 12 commits into
labring:mainfrom
FinleyGe:codex/agent

Conversation

@FinleyGe

@FinleyGe FinleyGe commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add Agent generated as a selectable tool parameter input mode
  • align Agent tool configuration UI with workflow parameter controls
  • preserve manual configuration for multiselect and other form input types

Validation

  • corepack pnpm exec eslint packages/web/components/core/workflow/NodeInputSelect.tsx projects/app/src/pageComponents/app/detail/Edit/component/ConfigToolModal.tsx packages/global/core/app/formEdit/utils.ts packages/global/test/core/app/formEdit/utils.test.ts
  • corepack pnpm --filter @fastgpt/app typecheck
  • corepack pnpm --filter @fastgpt/global test -- test/core/app/formEdit/utils.test.ts
  • git diff --check

@FinleyGe FinleyGe force-pushed the codex/agent branch 2 times, most recently from 0714ce4 to 563a045 Compare July 7, 2026 10:16
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

Build Successful - Preview fastgpt Image for this PR:

ghcr.io/labring/fastgpt-pr:fastgpt_e7967ad1b5b1ae274ebca3c350f8b93f55659f3d

🕒 Time: 2026-07-09 18:24:28 (UTC+8)

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 18.07% 1598 / 8839
🔵 Statements 18.09% 1680 / 9285
🔵 Functions 15.99% 337 / 2107
🔵 Branches 15.08% 762 / 5050
File CoverageNo changed files found.
Generated in workflow #1362 for commit e7967ad by the Vitest Coverage Report Action

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

Admin Preview Image Ready!

ghcr.io/labring/fastgpt-pr:admin_e7967ad1b5b1ae274ebca3c350f8b93f55659f3d

🕒 Time: 2026-07-09 18:23:22 (UTC+8)

FinleyGe added 12 commits July 14, 2026 21:48
- Add `FlowNodeInputTypeEnum.agentGenerated` to distinguish parameters
  generated by the model during tool calls.
- Implement `initToolInputTypeByDefaultMode` to handle initialization
  based on tool descriptions and safe boundaries.
- Update ToolCall and Agent runtime schema generators to filter
  parameters based on final input type.
- Add security boundaries to prevent sensitive fields (e.g., secrets,
  files, model selection) from being marked as agent-generated.
- Update UI components to support configuration of parameter sources and
  improve state management for tool inputs.
Add `isToolParam` to handle default input generation logic more
precisely
than `toolDescription`, ensuring better control over which fields are
exposed as model parameters in the tool call schema.
Remove persisting default tool input mode (isToolParam) and centralize
selection via saved input by introducing stripToolInputDefaultMode and
updating call sites to pass savedInput only.

Propagate tool errors through the agent loop by carrying errorMessage
in tool results and dispatch, so errors do not produce visible node
responses.
Update tests, runtime types, and i18n descriptions accordingly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant