feat: default agenthub_config to codedagentsplayground at design time - #125
Draft
al3xanndru wants to merge 2 commits into
Draft
feat: default agenthub_config to codedagentsplayground at design time#125al3xanndru wants to merge 2 commits into
al3xanndru wants to merge 2 commits into
Conversation
PlatformBaseSettings.agenthub_config now defaults to "codedagentsplayground" for design-time runs (local, Studio Web, or a debug session) instead of None, so directly-constructed coded-agent chat/embedding clients draw the CodedAgents.Playground licensing pool. A deployed run — a real Orchestrator job that is neither a Studio Web project nor rooted to a debug session — keeps agenthub_config None, which the gateway resolves to AgentHub.LLM (unchanged). The value is computed only when no explicit agenthub_config is supplied (UIPATH_AGENTHUB_CONFIG unset). Callers that pass an explicit value — low-code agents and evaluators via get_chat_model(agenthub_config=...) — override it via model_copy (which does not re-run the validator) and are unaffected; an explicit empty string stays an opt-out. Bumps both packages to 1.18.0 with changelogs (core behavior change). Pairs with AgentHubService #1618 and gitops #551167 (CodedAgents.Playground real-cost metering). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
al3xanndru
requested review from
DragosBobolea,
cosminacho,
cristipufu,
dragosvelcea,
ionmincu,
ionut-mihalache-uipath,
radu-mocanu and
vldcmp-uipath
as code owners
August 13, 2026 07:16
Replace the private _is_deployed_execution() copy (and the local AGENTHUB_CONFIG_CODED_AGENTS_PLAYGROUND constant) with the shared resolve_coded_agenthub_config() helper from uipath.platform, so the langchain path and the other coded frameworks classify design-time vs deployed identically. Behavior is unchanged. Bumps the uipath-platform floor to >=0.2.18 (the release that adds the helper). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Author
|
Refactored to consume the shared New stacking: this now requires |
al3xanndru
marked this pull request as draft
August 13, 2026 14:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Makes coded agents meter their design-time LLM calls as
CodedAgents.Playgroundinstead ofAgentHub.LLM.PlatformBaseSettings.agenthub_confignow defaults tocodedagentsplaygroundfor design-time runs (local, Studio Web, or a debug session) instead ofNone; a deployed run keeps itNone→ gateway resolves toAgentHub.LLM(unchanged).Because every coded chat/embedding client resolves settings through
PlatformSettingsand coded user code constructs clients directly (bypassing the factory), the env-bridge/default is the single place that covers all execution modes and all three frameworks (langchain / llamaindex / openai-agents) without per-framework code.How
PlatformBaseSettingsgains an after-validator (settings/platform/settings.py):_is_deployed_execution()=UiPathConfig.job_key and not is_studio_project and not is_rooted_to_debug_job. Value matches AgentHubServiceAgentHubConfigValues.CodedAgentsPlayground.Mode → result:
codedagentsplaygroundUIPATH_PROJECT_IDcodedagentsplaygroundisDebugcodedagentsplaygroundNone→AgentHub.LLMPrecedence / non-interference
get_chat_model(agenthub_config=...), which overrides viamodel_copy(does not re-run this validator). So low-code (agentsplayground/agentsruntime) and eval (agentsevals) are unaffected.UIPATH_AGENTHUB_CONFIGstill takes precedence over the computed default.None).Scope / behavior change (intentional)
This changes the default for all directly-constructed platform LLM clients: a non-deployed process (e.g. a plain local
UiPathChat()script) now sendscodedagentsplaygroundand draws the playground pool. Deployed processes are unchanged. This is the accepted trade-off for a single-repo, all-modes solution. Minor version bump (1.17.1 → 1.18.0) on both packages with changelogs.Tests
Updated
tests/core/features/settings/test_platform.py: deployed → header omitted; design-time →codedagentsplayground; Studio Web → design-time; explicit env override wins. (Pre-existingllmgateway-parametrized errors intest_factory_function.pyare environmental — missingLLMGW_*env — and independent of this change.)Downstream follow-up (separate repos)
tests/chat/test_agenthub_config_default.py::test_default_is_noneasserts the oldNonedefault and must be updated when it bumps touipath-llm-client >= 1.18.0. Same for the other framework repos when they bump.Related
CodedAgents.PlaygroundsendscostUsd).codedagents_playground.jsondraws the pool at real cost).🤖 Generated with Claude Code