feat(platform): add resolve_coded_agenthub_config() shared helper - #1860
Draft
al3xanndru wants to merge 1 commit into
Draft
feat(platform): add resolve_coded_agenthub_config() shared helper#1860al3xanndru wants to merge 1 commit into
al3xanndru wants to merge 1 commit into
Conversation
Add a single source of truth for classifying a coded-agent run as design-time vs deployed, so all coded frameworks (langchain / llamaindex / openai-agents) send the same x-uipath-agenthub-config value. resolve_coded_agenthub_config() returns "codedagentsplayground" for design-time runs (local, Studio Web, or a debug session) so LLM calls draw the CodedAgents.Playground pool, and None for a deployed run (a real Orchestrator job that is neither a Studio Web project nor rooted to a debug session) -> AgentHub.LLM. Adds the AGENTHUB_CONFIG_CODED_AGENTS_PLAYGROUND constant and exports the helper from uipath.platform.common. Bumps uipath-platform 0.2.17 -> 0.2.18. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a shared helper to uipath-platform to consistently classify coded-agent executions as design-time vs deployed and return the appropriate x-uipath-agenthub-config header value, reducing duplicated logic across downstream coded-agent frameworks.
Changes:
- Introduces
resolve_coded_agenthub_config()inuipath.platform.commonto return"codedagentsplayground"for design-time runs andNonefor deployed runs. - Adds
AGENTHUB_CONFIG_CODED_AGENTS_PLAYGROUNDconstant and expands tests to cover local/deployed/Studio Web/debug-rooted scenarios. - Bumps
uipath-platformversion0.2.17 → 0.2.18and updates lockfile accordingly.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/uipath-platform/src/uipath/platform/common/_config.py | Adds resolve_coded_agenthub_config() helper implementing the design-time vs deployed classification. |
| packages/uipath-platform/src/uipath/platform/common/init.py | Re-exports the new helper from uipath.platform.common. |
| packages/uipath-platform/src/uipath/platform/constants/init.py | Adds the codedagentsplayground AgentHub config constant for header usage. |
| packages/uipath-platform/tests/common/test_config_env_vars.py | Adds unit tests covering the helper’s behavior across 4 execution modes. |
| packages/uipath-platform/pyproject.toml | Bumps package version to 0.2.18. |
| packages/uipath-platform/uv.lock | Updates lock metadata/version entry consistent with the release bump. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+52
to
+54
| # Value for HEADER_AGENTHUB_CONFIG that maps to the CodedAgents.Playground licensing | ||
| # operation code (matches AgentHubService AgentHubConfigValues.CodedAgentsPlayground). | ||
| AGENTHUB_CONFIG_CODED_AGENTS_PLAYGROUND = "codedagentsplayground" |
|
al3xanndru
marked this pull request as draft
August 13, 2026 14:00
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
Adds a single, shared helper in
uipath-platformthat classifies a coded-agent run as design-time vs deployed, so every coded framework (langchain / llamaindex / openai-agents) sends the samex-uipath-agenthub-configvalue instead of duplicating the logic."codedagentsplayground"→ LLM calls draw the CodedAgents.Playground pool.None→ gateway resolves to AgentHub.LLM.Logic (over
UiPathConfig):codedagentsplaygroundcodedagentsplaygroundcodedagentsplaygroundNone(AgentHub.LLM)Change
common/_config.py:resolve_coded_agenthub_config().constants/__init__.py:AGENTHUB_CONFIG_CODED_AGENTS_PLAYGROUND = "codedagentsplayground"(matches AgentHubServiceAgentHubConfigValues.CodedAgentsPlayground).uipath.platform.common.uipath-platform0.2.17 → 0.2.18.ruff+mypyclean.Consumers (follow-ups)
_is_deployed_execution()copy to import this helper (LangGraph path).uipath-integrations-python) will call it and inject thex-uipath-agenthub-configheader.Part of the coded-agent → CodedAgents.Playground metering work (AgentHubService #1618, gitops #551167).
🤖 Generated with Claude Code