// Generated from openapi/openapi.json. Do not edit by hand.

export type BootstrapResponse = {
  "app_version": string;
  "dependencies": Array<{
  "service_id": string;
  "status": "available" | "paused" | "degraded" | "unavailable";
}>;
  "model_summary": {
  "config_set_version": number | null;
  "configured_default_model_id": string | null;
  "recommended_model_id": string | null;
  "runtime_availability_version": number | null;
};
  "public_features": Array<{
  "feature_id": string;
  "status": "enabled" | "disabled" | "paused";
}>;
};

export type BrowserSupportRequest = {
  "brands": Array<{
  "brand": string;
  "version": string;
}>;
  "full_version_list": Array<{
  "brand": string;
  "version": string;
}>;
  "platform": string;
};

export type BrowserSupportSuccess = {
  "app_version": string;
  "browser": {
  "brand": "Google Chrome" | "Microsoft Edge";
  "major": number;
};
  "status": "supported";
  "supported_browsers": Array<{
  "brand": "Google Chrome" | "Microsoft Edge";
  "major": number;
}>;
};

export type BrowserUnsupportedReason = "platform_unsupported" | "brand_unsupported" | "version_unsupported" | "identity_unavailable";

export type CorrelationId = string;

export type ErrorDetails = {
  "capacity_status"?: "normal" | "warning" | "critical" | "full" | "unavailable";
  "current_task_ref"?: string;
  "field_errors"?: Array<{
  "field": string;
  "message_key": string;
}>;
  "latest_version"?: number | string;
  "reason"?: "platform_unsupported" | "brand_unsupported" | "version_unsupported" | "identity_unavailable";
  "remaining_bytes"?: number;
  "supported_browsers"?: Array<{
  "brand": "Google Chrome" | "Microsoft Edge";
  "major": number;
}>;
};

export type ErrorEnvelope = {
  "error": {
  "code": "BROWSER_UNSUPPORTED" | "MODEL_CONFIG_VERSION_CONFLICT" | "MODEL_DEFAULT_REPLACEMENT_REQUIRED" | "MODEL_DEFAULT_REPLACEMENT_INVALID" | "MODEL_RECOMMENDATION_PRIORITY_INVALID" | "MODEL_RECOMMENDATION_PRIORITY_CONFLICT" | "PRIVATE_CONTENT_NOTICE_ACK_REQUIRED" | "ASSET_HISTORY_REFERENCE_CONFLICT" | "ASSET_CLEANUP_CANDIDATE_STALE" | "STORAGE_CAPACITY_EXCEEDED";
  "correlation_id": string;
  "details": {
  "capacity_status"?: "normal" | "warning" | "critical" | "full" | "unavailable";
  "current_task_ref"?: string;
  "field_errors"?: Array<{
  "field": string;
  "message_key": string;
}>;
  "latest_version"?: number | string;
  "reason"?: "platform_unsupported" | "brand_unsupported" | "version_unsupported" | "identity_unavailable";
  "remaining_bytes"?: number;
  "supported_browsers"?: Array<{
  "brand": "Google Chrome" | "Microsoft Edge";
  "major": number;
}>;
};
  "error_category"?: "upstream_timeout" | "upstream_failed" | "safety_rejected" | "model_disabled" | "gateway_balance_insufficient" | "gateway_contract_invalid" | "reference_invalid" | "unknown_retryable" | "unknown_non_retryable";
  "message_key": string;
};
};

export type GenerationErrorCategory = "upstream_timeout" | "upstream_failed" | "safety_rejected" | "model_disabled" | "gateway_balance_insufficient" | "gateway_contract_invalid" | "reference_invalid" | "unknown_retryable" | "unknown_non_retryable";

export type ModelConfigSseEvent = {
  "config_set_version": number;
  "entity_ref": string;
  "event_id": number;
  "event_type": "model_config_changed";
  "occurred_at": string;
};

export type ModelRuntimeSseEvent = {
  "entity_ref": string;
  "event_id": number;
  "event_type": "model_runtime_changed";
  "occurred_at": string;
  "runtime_availability_version": number;
};

export type SseEvent = {
  "entity_ref": string;
  "event_id": number;
  "event_type": string;
  "occurred_at": string;
  "state_version": number;
} | {
  "config_set_version": number;
  "entity_ref": string;
  "event_id": number;
  "event_type": "model_config_changed";
  "occurred_at": string;
} | {
  "entity_ref": string;
  "event_id": number;
  "event_type": "model_runtime_changed";
  "occurred_at": string;
  "runtime_availability_version": number;
};

export type StableEngineeringErrorCode = "BROWSER_UNSUPPORTED" | "MODEL_CONFIG_VERSION_CONFLICT" | "MODEL_DEFAULT_REPLACEMENT_REQUIRED" | "MODEL_DEFAULT_REPLACEMENT_INVALID" | "MODEL_RECOMMENDATION_PRIORITY_INVALID" | "MODEL_RECOMMENDATION_PRIORITY_CONFLICT" | "PRIVATE_CONTENT_NOTICE_ACK_REQUIRED" | "ASSET_HISTORY_REFERENCE_CONFLICT" | "ASSET_CLEANUP_CANDIDATE_STALE" | "STORAGE_CAPACITY_EXCEEDED";

export type StateSseEvent = {
  "entity_ref": string;
  "event_id": number;
  "event_type": string;
  "occurred_at": string;
  "state_version": number;
};
