fix: Fall back to sdk_version when version is unknown#60
fix: Fall back to sdk_version when version is unknown#60
Conversation
The agent-server binary may report version='unknown' when build metadata isn't injected at build time. This breaks the version compatibility check even though sdk_version is valid. Fall back to sdk_version when version is missing or 'unknown'. The SDK version is reliable (comes from the installed package) and represents the actual API compatibility level.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@OpenHands why do we have two different variables version and server_version in the first place? Is that a bug in the sdk? |
|
I'm on it! neubig can track my progress at all-hands.dev |
|
@neubig I think there’s a small naming mix-up here: the API payload has I checked
So I don’t think this is a bug in the TypeScript SDK. The real issue is that in some dev/containerized builds, the agent-server package metadata can come back as So the bug is really on the GUI side: we were assuming This comment was created by an AI agent (OpenHands) on behalf of the user. |
|
Final summary:
Conciseness check:
|
…age only - Update SettingsService to use typescript-client SettingsClient for CRUD - Settings are now fetched from and saved to agent-server /api/settings - localStorage acts as fallback/cache for offline scenarios - Update SecretsService to use SettingsClient for custom secrets - Update typescript-client dependency to include settings CRUD endpoints - Fix tests to properly mock async saveSettings - Update AGENTS.md with settings persistence architecture docs The agent-server persists settings to ~/.openhands/settings.json and secrets to ~/.openhands/secrets.json with API key encryption.
neubig
left a comment
There was a problem hiding this comment.
I think this seems reasonable.
Problem
The agent-server binary may report
version: "unknown"when build metadata isn't injected at build time (common in dev builds or containerized deployments). This breaks the version compatibility check even thoughsdk_versionis valid and indicates a compatible version.Example server info response:
{ "version": "unknown", "sdk_version": "1.19.1", ... }The GUI shows "Unsupported agent server version" error even though
sdk_version: 1.19.1is >= the required1.17.0.Solution
Fall back to
sdk_versionwhenversionis missing or"unknown". The SDK version is reliable (comes from the installed package) and represents the actual API compatibility level.Changes
getServerVersion()insrc/api/agent-server-compatibility.tsto check ifversionis valid before using itversionis"unknown"or missing, usesdk_versioninsteadThis PR was created by an AI agent (OpenHands) to fix version compatibility issues when running agent-server-gui with containerized agent-server deployments.
@malhotra5 can click here to continue refining the PR