Updates ModelsListResponse types to handle empty lists
Allows first_id and last_id to be null when no models are present Improves type safety by explicitly handling edge cases in model list responses, preventing potential null reference issues
This commit is contained in:
1 file changed
+4
-4
@@ -154,12 +154,12 @@ export interface ModelInfo {
|
||||
export interface ModelsListResponse {
|
||||
/** Array of model information */
|
||||
data: ModelInfo[];
|
||||
/** ID of first model in list */
|
||||
first_id: string;
|
||||
/** ID of first model in list (null when data is empty) */
|
||||
first_id: string | null;
|
||||
/** Whether more models are available */
|
||||
has_more: boolean;
|
||||
/** ID of last model in list */
|
||||
last_id: string;
|
||||
/** ID of last model in list (null when data is empty) */
|
||||
last_id: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user