This repository was archived by the owner on Sep 7, 2026. It is now read-only.
Repository navigation
refactor(client): remove dead ApiKeysClient and SessionClient (keys + accept_tos) - #225
Merged
Merged
Conversation
… accept_tos)
These client surfaces call SaaS endpoints that no consumer reaches through
this package: they are absent from the agent-server (on every branch) and
unused by agent-canvas. The endpoints themselves are served by the
OpenHands/OpenHands `enterprise/` server and consumed by its own frontend
(its own axios client, not @openhands/typescript-client).
- Remove ApiKeysClient and ConversationManager.apiKeys
(GET /api/keys, POST /api/keys, DELETE /api/keys/{id}).
- Remove SessionClient and ConversationManager.session. acceptTos
(POST /api/accept_tos) was its only remaining method after #224 removed
unsetProviderTokens, so the now-empty class is dropped entirely rather
than left as a no-op.
Also drops the now-orphaned types ApiKey, CreateApiKeyResponse,
AcceptTosResponse and the ApiKeysClientOptions / SessionClientOptions
exports.
SharedClient (GET /api/shared-events/search) is retained — it is actively
used by agent-canvas.
BREAKING CHANGE: removes the public ApiKeysClient and SessionClient classes,
ConversationManager.apiKeys, ConversationManager.session, and the types
ApiKey / CreateApiKeyResponse / AcceptTosResponse.
Contributor
Endpoint audit❌ 8 off-contract call(s) — not on the agent-server · classifiers: cloud
❌ Not on agent-server (gated, 8)⛔ (no known backend) — served by no backend we can see (7)
|
Contributor
|
🚀 Released in v1.27.0. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Human
@neubig you added these end-points but it seems that neither the agent-server exposes nor agent-canvas consumes.
Can we delete them or you plan to use them?
What
Removes two more client surfaces for endpoints that no consumer reaches through this package — absent from the agent-server on every branch, and unused by agent-canvas. Follow-up to #224.
ApiKeysClient(whole class) +ConversationManager.apiKeysGET /api/keys,POST /api/keys,DELETE /api/keys/{}SessionClient(whole class) +ConversationManager.sessionPOST /api/accept_tosacceptToswas its only remaining method after #224 removedunsetProviderTokens, so the now-empty class is dropped entirely rather than left as a no-op.Also drops the orphaned types
ApiKey,CreateApiKeyResponse,AcceptTosResponseand theApiKeysClientOptions/SessionClientOptionsexports.Where these endpoints actually live
They are served by the
OpenHands/OpenHandsenterprise/server (the SaaS backend) and consumed by its own frontend via its own axios client — not@openhands/typescript-client:enterprise/server/routes/api_keys.py(APIRouter(prefix='/api/keys'))enterprise/server/routes/auth.py(@api_router.post('/accept_tos'))So removing these client classes does not affect
OpenHands/OpenHands, agent-canvas, or the agent-server.Scope notes
SharedClient(GET /api/shared-events/search) is kept — it's actively used by agent-canvas (use-shared-conversation.ts,use-shared-conversation-events.ts)./api/keys/**current**endpoint that agent-canvas does call is a different route, reached via the cloud-proxy, not viaApiKeysClient— unaffected.Breaking change
Removes the public
ApiKeysClientandSessionClientclasses,ConversationManager.apiKeys,ConversationManager.session, and the typesApiKey/CreateApiKeyResponse/AcceptTosResponse.Verification
tsc --noEmit: cleannpm run lint: 0 errors (pre-existingno-explicit-anywarnings only)npm test: 258/258 pass (14 suites)