defmodule AI.Errors do @moduledoc """ Error types used across the SDK. """ defmodule InvalidPromptError do @moduledoc """ Raised when a prompt or messages input is invalid. """ defexception [:message, :prompt] end defmodule InvalidToolInputError do @moduledoc """ Raised when a tool input does not match its JSON schema. """ defexception [:message, :tool_name, :input] end defmodule NoSuchToolError do @moduledoc """ Raised when a tool name is not found in the tool map. """ defexception [:message, :tool_name] end defmodule ProviderError do @moduledoc """ Raised for provider-specific errors. """ defexception [:message, :provider, :details] end end