Add LLM subscription client methods#178
Conversation
Co-authored-by: openhands <openhands@all-hands.dev>
all-hands-bot
left a comment
There was a problem hiding this comment.
🟡 Acceptable - Implementation is clean and follows existing patterns, but has missing test coverage and type inconsistencies that should be addressed.
Was this automated review useful? React with 👍 or 👎 to this review to help us measure review quality.
Workflow run: https://github.com/OpenHands/typescript-client/actions/runs/26336719042
all-hands-bot
left a comment
There was a problem hiding this comment.
🟡 Acceptable - Implementation is clean and follows existing patterns. Previous test coverage gap has been addressed. One minor type consistency issue remains.
[TESTING COVERAGE]
✅ All 5 methods now have test coverage (getOpenAISubscriptionModels test added)
✅ Token non-exposure verified
✅ Endpoint paths verified
[RISK ASSESSMENT]
- [Overall PR]
⚠️ Risk Assessment: 🟢 LOW
Adding new client methods to existing LLMMetadataClient with comprehensive test coverage. No breaking changes to existing functionality. Standard CRUD operations following established patterns.
VERDICT:
✅ Worth merging: Core implementation is solid, test coverage complete, only minor type style improvement suggested
KEY INSIGHT:
Previous review feedback has been addressed - missing test coverage added and type definitions improved from number | string | null to number | null.
Was this automated review useful? React with 👍 or 👎 to this review to help us measure review quality.
Workflow run: https://github.com/OpenHands/typescript-client/actions/runs/26410852540
…client Co-authored-by: openhands <openhands@all-hands.dev>
5513585 to
b025805
Compare
|
Updated the TypeScript client branch through b025805: merged current main, kept subscription client methods/tests green, and resolved the prior review threads. This remains the temporary git pin used by agent-canvas until this PR is merged and released.\n\nThis comment was generated by an AI agent (OpenHands) on behalf of neubig. |
|
CI is green on b025805, all review threads are resolved, and this PR is ready for another review/merge gate pass.\n\nThis comment was generated by an AI agent (OpenHands) on behalf of neubig. |
|
✅ Review complete. This review was performed through OpenHands Cloud Automation. You can log in and view the conversation here. |
all-hands-bot
left a comment
There was a problem hiding this comment.
🟢 Good taste — Elegant, simple solution that follows existing patterns in the codebase.
This PR adds LLM subscription client methods for OpenAI OAuth device flow authentication. The implementation is clean and consistent with the existing LLMMetadataClient patterns.
[TESTING GAPS]
- [src/tests/api-clients.test.ts] Good coverage of happy paths and token non-exposure verification. Consider adding a test for the error case when
pollOpenAISubscriptionDeviceLogintimes out or returns an error response to ensure proper error handling.
[RISK ASSESSMENT]
- [Overall PR]
⚠️ Risk Assessment: 🟢 LOW
This is a pure addition of new client methods with no breaking changes. The OAuth device flow implementation follows a well-established pattern. Tests verify token non-exposure, which is critical for security.
VERDICT:
✅ Worth merging: Clean implementation that follows project conventions.
KEY INSIGHT:
The OAuth device flow implementation correctly avoids exposing API tokens during the subscription authentication process.
This review was generated by an AI agent (OpenHands) on behalf of the user through OpenHands Automation. View conversation
Summary
Tests
This PR was created by an AI agent (OpenHands) on behalf of the user.
Issue
Fixes #201
This PR description update was created by an AI agent (OpenHands) on behalf of Graham Neubig.