feat(online-scoring): enable agentic-tools by default for all deployments - #7950
feat(online-scoring): enable agentic-tools by default for all deployments#7950aadereiko wants to merge 1 commit into
Conversation
…ents The agentic-tools path on LLM-as-judge online scoring was only reaching Comet-hosted environments, which pin TOGGLE_AGENTIC_TOOLS_ENABLED=true in their chart values. Self-hosted installs inherit the image's config.yml default, and that default was still "false", so neither the docker-compose nor the helm install path ever turned the feature on. Flip the config.yml default to "true" so every deployment gets it. Neither deployment/docker-compose/docker-compose.yaml nor the helm chart's component.backend.env names this variable, so both inherit the new default with no chart change; operators can still force the inline path by setting TOGGLE_AGENTIC_TOOLS_ENABLED=false. config-test.yml mirrors the flip so app-booting tests exercise the path real deployments run. The unit tests are unaffected (they mock ServiceTogglesConfig and stub isAgenticToolsEnabled per case), and TraceThreadOnlineScoringAgenticTools E2ETest already forced the toggle on via customConfigs. The frontend DEFAULT_STATE stays false on purpose: it only applies when the backend omits the key, i.e. a newer FE against a BE with no agentic support. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
📋 PR Linter Failed❌ Invalid Title Format. Your PR title must include a ticket/issue number and may optionally include component tags (
Example: ❌ Missing Section. The description is missing the ❌ Missing Section. The description is missing the ❌ Missing Section. The description is missing the ❌ Missing Section. The description is missing the |
⏱️ pre-commit per-hook timingNo linted files changed — nothing to run. ⏭️ 43 skipped (no matching files changed)
|
|
This change looks worth a test. Flipping agenticToolsEnabled to true changes what a default OSS install does: GET /v1/private/toggles/ now returns agentic_tools_enabled: true, and the LLM-judge rule dialog reads that toggle — {{spans}} / {{trace}} in a trace-scope prompt now auto-fill as reserved sentinels instead of staying empty, user-mappable rows. online-evaluation-smoke.spec.ts is tagged @cap:online-evaluation.create-llm-judge-rule, but it builds the rule from the canned Moderation template, which has no reserved variables, and its 5 seeded traces are nowhere near the 50k-token routing threshold — it passes identically with the toggle on or off, and nothing else under tests_end_to_end/ mentions spans, trace or the toggles endpoint. Worth pinning the dialog behaviour and the toggle default. The agentic-tools loop itself needs a provider key and a 50k-token trace, so that part stays manual either way. Would target What it would check
Deploying a test environment for this PR and exploring it — results will follow in a comment. also touches Backend (Java API / internal) Advisory, from the QA test radar. Nothing here blocks this PR, and anything it proposes is a draft for review. |
|
🔄 Test environment deployment process has started Phase 1: Deploying base version You can monitor the progress here. |
| # Default: true | ||
| # Description: Master switch for the agentic-tools path on LLM-as-judge online scoring. When false, the | ||
| # inline path is used regardless of context size. Threshold lives under onlineScoring.agenticToolsThresholdTokens. | ||
| agenticToolsEnabled: ${TOGGLE_AGENTIC_TOOLS_ENABLED:-"false"} | ||
| # On by default for every deployment, self-hosted included; set TOGGLE_AGENTIC_TOOLS_ENABLED=false to force | ||
| # the inline path (e.g. to keep online scoring on a single LLM round-trip). | ||
| agenticToolsEnabled: ${TOGGLE_AGENTIC_TOOLS_ENABLED:-"true"} |
There was a problem hiding this comment.
Pathological tools block scoring workers
Defaulting agenticToolsEnabled to true runs model-controlled JqTool expressions and SearchTool regexes synchronously on the scheduler with no complexity or size limits, so a pathological expression can occupy a scheduler thread indefinitely before the round/output caps are even checked — should agentic tools stay opt-in by default, and should we add expression/pattern complexity limits plus an enforceable timeout or isolated worker budget?
Want Baz to fix this for you? Activate Fixer
Other fix methods
Prompt for AI Agents
Before applying, verify this suggestion against the current code. In
apps/opik-backend/config.yml around lines 1471-1476, update the `agenticToolsEnabled`
online-scoring feature flag so agentic tools remain opt-in by default rather than
enabling potentially unbounded `JqTool` and `SearchTool` execution for every deployment.
Also harden the corresponding tool execution paths with expression/pattern size and
complexity limits plus an enforceable timeout or isolated worker resource budget; do not
rely on the existing round/output caps, which are checked only after execution
completes.
|
✅ Test environment is now available! To configure additional Environment variables for your environment, run [Deploy Opik AdHoc Environment workflow] (https://github.com/comet-ml/comet-deployment/actions/workflows/deploy_opik_adhoc_env.yaml) Access Information
The deployment has completed successfully and the version has been verified. |
|
🌙 Nightly cleanup: The test environment for this PR ( |
Why
The agentic-tools path on LLM-as-judge online scoring only ever reached Comet-hosted environments, which pin
TOGGLE_AGENTIC_TOOLS_ENABLED=truein their chart values. Self-hosted installs inherit the image'sconfig.ymldefault — and that default was still"false", so neither the docker-compose nor the helm install path ever turned the feature on. Enabling it for self-hosted was requested.What
Flip the
serviceToggles.agenticToolsEnableddefault inapps/opik-backend/config.ymlfrom"false"to"true".That single line covers every self-hosted install, because neither deployment path names this variable:
TOGGLE_AGENTIC_TOOLS_ENABLED?deployment/docker-compose/docker-compose.yamlTOGGLE_OLLIE_ENABLED,TOGGLE_OPIK_AI_ENABLED,TOGGLE_GUARDRAILS_ENABLED,TOGGLE_WELCOME_WIZARD_ENABLEDcomponent.backend.env→configmap-backend.yamlconfigmap-backend.yamlonly emits keys present incomponent.backend.env, so an absent key means no env var in the pod and the image default applies. Operators keep full control — addingcomponent.backend.env.TOGGLE_AGENTIC_TOOLS_ENABLED: "false"still wins — while the image retains the ability to move the default, which is exactly the property a chart-pinned value would destroy. Hence no chart change here.Test config
config-test.ymlmirrors the flip so app-booting tests exercise the path real deployments now run. Previously CI validated the inline path while we were about to ship the agentic one as the default.Deliberately unchanged
DEFAULT_STATEstaysfalse(feature-toggles-provider.tsx). It only applies when the backend omits the key — a newer FE against an older BE with no agentic support. Flipping it would enable UI affordances the backend can't honour.values.yaml— see the table above. Also worth noting noTOGGLE_*key appears in the generated chart README for any component, so listing just this one would be inconsistent; documenting all toggles is a separate change.Testing
Run locally against the flipped
config-test.yml:TraceThreadOnlineScoringAgenticToolsE2ETestTraceThreadOnlineScoringSamplerListenerIntegrationTestOnlineScoringSpanSamplerIntegrationTestAutomationRuleEvaluatorsResourceTestConditionTimeout, see belowManualEvaluationResourceTestThe
AutomationRuleEvaluatorsResourceTestfailure is not attributable to this change, on three grounds:getLogsUserDefinedMetricPythonScorer, thengetLogsTraceSkippedDueToDisabledRule— each passing in the other run.falseandtrue.enabled(false), so no scorer is ever invoked and a flag governing scorer context-building cannot reach it.Every failure had the shape
Expected size: N but was: 0 … within 10 seconds— zero logs, i.e. the Awaitility window losing a race under class-level load, not a behavioural divergence (which would emit logs with diverging content).🤖 Generated with Claude Code