Skip to content

Add workflow parameter access in config blocks#1030

Draft
LasmarKhalifa wants to merge 1 commit into
mainfrom
07-02/access-params-in-config-blocks
Draft

Add workflow parameter access in config blocks#1030
LasmarKhalifa wants to merge 1 commit into
mainfrom
07-02/access-params-in-config-blocks

Conversation

@LasmarKhalifa

@LasmarKhalifa LasmarKhalifa commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Closes #1006

Workflow params (target!, targets, arg?, args, kwarg, kwarg!, kwarg?, kwargs) are currently only available in execute blocks. This PR makes it possible to read them inside cog config blocks and the global block, so cogs can be configured based on how the workflow was invoked.

Example usage:

config do
  chat do
    model(arg?(:fast) ? "gpt-5.4-nano" : "gpt-5")
  end
  global do
    abort_on_failure! if arg?(:strict)
  end
end

They are not available in the top-level config do body, only within the cog / global blocks nested inside it.

The accessors mirror the execute-side ones on CogInputContext with identical behavior.

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@LasmarKhalifa LasmarKhalifa force-pushed the 07-02/access-params-in-config-blocks branch from 4f4cb7d to d5e2ae2 Compare July 7, 2026 19:42
@LasmarKhalifa LasmarKhalifa force-pushed the 07-02/access-params-in-config-blocks branch from d5e2ae2 to 8099664 Compare July 7, 2026 20:54
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.

Add access to workflow parameters in config blocks

1 participant