Conversation
- prefer OH_WEB_URL when resolving Config.web_url - keep RUNTIME_URL as a deprecated fallback through v1.18.0 - add tests for warning emission and env var precedence Co-authored-by: openhands <openhands@all-hands.dev>
Python API breakage checks — ✅ PASSEDResult: ✅ PASSED |
REST API breakage checks (OpenAPI) — ❌ FAILEDResult: ❌ FAILED
Log excerpt (first 1000 characters) |
- inline OH_WEB_URL in the legacy RUNTIME_URL fallback - keep the deprecation behavior unchanged Co-authored-by: openhands <openhands@all-hands.dev>
- merge latest main into the branch - move the legacy env var deprecation to 1.14.0 -> 1.19.0 - keep the five-minor-release removal window after the version bump Co-authored-by: openhands <openhands@all-hands.dev>
all-hands-bot
left a comment
There was a problem hiding this comment.
🟢 Good taste - LGTM
This is textbook deprecation done right:
✅ Backward compatible: RUNTIME_URL still works, just emits a warning
✅ Clear migration path: Warning tells users exactly what to do (OH_WEB_URL)
✅ Reasonable timeline: 5 minor releases (1.14.0 → 1.19.0) gives users runway
✅ Simple implementation: Prefers new env var, falls back to old with warning—no special cases
✅ Comprehensive tests: Covers default, new var, old var with warning, precedence, and explicit override
KEY INSIGHT: Good deprecation eliminates technical debt without breaking user space—this achieves both.
The code is clean, the tests verify real behavior (not just mocks), and the deprecation warning makes the preferred path crystal clear. No complexity, no edge cases, no breaking changes.
Summary
Deprecate the legacy
RUNTIME_URLenvironment variable and preferOH_WEB_URLfor resolvingConfig.web_url, while keeping the old variable as a fallback through v1.18.0 (five minor releases from v1.13.x).Changes
OH_WEB_URLwhen resolvingConfig.web_urlRUNTIME_URLas a fallback for backward compatibilityRUNTIME_URLis used as the fallbackremoved_in="1.18.0"OH_WEB_URLresolutionRUNTIME_URLfallback warningWhy
PR #2423 introduced
RUNTIME_URLcompatibility so path-based OpenAPI docs would keep working without updating downstream runtime integration immediately. Since we plan to remove that legacy env var, we should deprecate it explicitly rather than leave only a TODO.This keeps compatibility today while making the preferred configuration path clear:
OH_WEB_URLRUNTIME_URLValidation
uv run pre-commit run --files openhands-agent-server/openhands/agent_server/config.py tests/agent_server/test_api.pyuv run pytest tests/agent_server/test_api.pyReference
Agent Server images for this PR
• GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server
Variants & Base Images
eclipse-temurin:17-jdknikolaik/python-nodejs:python3.13-nodejs22golang:1.21-bookwormPull (multi-arch manifest)
# Each variant is a multi-arch manifest supporting both amd64 and arm64 docker pull ghcr.io/openhands/agent-server:1d57896-pythonRun
All tags pushed for this build
About Multi-Architecture Support
1d57896-python) is a multi-arch manifest supporting both amd64 and arm641d57896-python-amd64) are also available if needed