use crate::adapter::openai_resp::resp_types::RespUsage;
use serde::{Deserialize, Serialize};
use serde_json::Value;
use serde_with::{serde_as, skip_serializing_none};

/// DOC: https://platform.openai.com/docs/api-reference/responses/object
///
/// NOTE: Not all OpenAI Responses Response properties have been set in this struct.
///       Mostly what is needed for the Chat Completion compatibility.
#[serde_as]
#[skip_serializing_none]
#[derive(Default, Debug, Clone, Serialize, Deserialize)]
pub struct RespResponse {
	/// Unique identifier for this Response.
	pub id: String,

	/// The status of the response generation. One of completed, failed, in_progress, cancelled, queued, or incomplete.
	pub status: String,

	/// {code: String, message: string}
	pub error: Option<Value>,

	/// An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.
	pub max_output_tokens: Option<i64>,

	/// Model ID used to generate the response, like gpt-4o or o3.
	pub model: String,

	/// An array of content items generated by the model.
	pub output: Vec<Value>,

	pub usage: Option<RespUsage>,
}
