-
Notifications
You must be signed in to change notification settings - Fork 4
Add LLM subscription client methods #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,31 @@ export interface VerifiedModelsResponse { | |
| models: Record<string, string[]>; | ||
| } | ||
|
|
||
| export interface LLMSubscriptionStatusResponse { | ||
| vendor: string; | ||
| connected: boolean; | ||
| account_email?: string | null; | ||
| expires_at?: number | string | null; | ||
| } | ||
|
Comment on lines
+33
to
+38
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Suggestion: Type inconsistencies in optional fields.
Check what the agent-server actually returns and match that exactly. |
||
|
|
||
| export interface LLMSubscriptionDeviceStartResponse { | ||
| device_code: string; | ||
| user_code: string; | ||
| verification_uri: string; | ||
| verification_uri_complete?: string | null; | ||
| expires_at: number | string; | ||
| interval_seconds: number; | ||
| } | ||
|
Comment on lines
+40
to
+47
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Suggestion: Same type inconsistency as above.
Consistency across these subscription response types will prevent runtime type confusion. |
||
|
|
||
| export interface LLMSubscriptionDevicePollRequest { | ||
| device_code: string; | ||
| } | ||
|
|
||
| export interface LLMSubscriptionModelsResponse { | ||
| vendor: string; | ||
| models: string[]; | ||
| } | ||
|
|
||
| export interface SettingsSchema { | ||
| model_name: string; | ||
| sections: Array<Record<string, unknown>>; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟠 Important: Missing test coverage for
getOpenAISubscriptionModels().The implementation adds 5 methods but this test only exercises 4. Add a test case for
getOpenAISubscriptionModels()to verify it correctly callsGET /api/llm/subscription/openai/modelsand returns the models array.