feat: pass model settings via kwargs to new_runtime#1062
feat: pass model settings via kwargs to new_runtime#1062
Conversation
Replace ConfigurableRuntimeFactory wrapper with direct kwargs passing: - Remove ConfigurableRuntimeFactory that wrapped factory and wrote temp files - Add _get_model_settings_override() to extract settings from eval set - Add _create_runtime_with_settings() to pass settings via kwargs - Backward compatible: falls back if factory doesn't support kwargs This change depends on uipath-runtime PR #62 which adds **kwargs to the new_runtime() protocol. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da238a54a1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return await self.factory.new_runtime( | ||
| entrypoint=entrypoint, | ||
| runtime_id=runtime_id, | ||
| settings=settings_override, | ||
| ) |
There was a problem hiding this comment.
Preserve model overrides with current runtime pin
The new runtime creation now only applies eval-set model overrides via self.factory.new_runtime(..., settings=settings_override, ...), but pyproject.toml still pins uipath-runtime>=0.3.1,<0.4.0, whose new_runtime signature does not accept a settings kwarg. On these currently supported versions the call at this point raises TypeError, the subsequent catch falls back to a settings-less call, and the user-specified --model-settings-id override is silently ignored. Previously ConfigurableRuntimeFactory rewrote the entrypoint so overrides worked even on older runtimes; after this change, overrides only take effect on yet-unpinned >=0.4.0, causing a regression for all existing installations.
Useful? React with 👍 / 👎.
Address regression where model settings override is silently ignored on uipath-runtime < 0.4.0 which doesn't support **kwargs in new_runtime(). Strategy: 1. Try kwargs approach first (works with uipath-runtime >= 0.4.0) 2. On TypeError, fall back to ConfigurableRuntimeFactory which creates a modified temp agent.json file with the settings applied This ensures model overrides work on current runtime pin (>=0.3.4,<0.5.0) while preferring the cleaner kwargs approach when available. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
handled by @mathurk's PR |
Summary
ConfigurableRuntimeFactorywrapper that wrapped the factory and wrote temp files_get_model_settings_override()to extract settings from eval set_create_runtime_with_settings()to pass settings vianew_runtime(settings=...)kwargsDependencies
This PR depends on uipath-runtime-python#62 which adds
**kwargsto thenew_runtime()protocol.Architecture
The new approach:
_get_model_settings_override()extracts model settings from eval set_create_runtime_with_settings()passes settings via kwargs tofactory.new_runtime(settings=...)This removes the need for:
ConfigurableRuntimeFactoryTest plan
🤖 Generated with Claude Code