19 "ENTROPIC_ERROR_INVALID_ARGUMENT",
20 "ENTROPIC_ERROR_INVALID_CONFIG",
21 "ENTROPIC_ERROR_INVALID_STATE",
22 "ENTROPIC_ERROR_MODEL_NOT_FOUND",
23 "ENTROPIC_ERROR_LOAD_FAILED",
24 "ENTROPIC_ERROR_GENERATE_FAILED",
25 "ENTROPIC_ERROR_TOOL_NOT_FOUND",
26 "ENTROPIC_ERROR_PERMISSION_DENIED",
27 "ENTROPIC_ERROR_PLUGIN_VERSION_MISMATCH",
28 "ENTROPIC_ERROR_PLUGIN_LOAD_FAILED",
29 "ENTROPIC_ERROR_TIMEOUT",
30 "ENTROPIC_ERROR_CANCELLED",
31 "ENTROPIC_ERROR_OUT_OF_MEMORY",
33 "ENTROPIC_ERROR_INTERNAL",
34 "ENTROPIC_ERROR_SERVER_ALREADY_EXISTS",
35 "ENTROPIC_ERROR_SERVER_NOT_FOUND",
36 "ENTROPIC_ERROR_CONNECTION_FAILED",
37 "ENTROPIC_ERROR_INVALID_HANDLE",
38 "ENTROPIC_ERROR_TOOL_EXECUTION_FAILED",
39 "ENTROPIC_ERROR_STORAGE_FAILED",
40 "ENTROPIC_ERROR_IDENTITY_NOT_FOUND",
41 "ENTROPIC_ERROR_ALREADY_RUNNING",
42 "ENTROPIC_ERROR_NOT_RUNNING",
43 "ENTROPIC_ERROR_NOT_IMPLEMENTED",
44 "ENTROPIC_ERROR_INTERRUPTED",
45 "ENTROPIC_ERROR_ADAPTER_NOT_FOUND",
46 "ENTROPIC_ERROR_ADAPTER_LOAD_FAILED",
47 "ENTROPIC_ERROR_ADAPTER_SWAP_FAILED",
48 "ENTROPIC_ERROR_ADAPTER_CANCELLED",
49 "ENTROPIC_ERROR_GRAMMAR_NOT_FOUND",
50 "ENTROPIC_ERROR_GRAMMAR_INVALID",
51 "ENTROPIC_ERROR_MCP_KEY_DENIED",
52 "ENTROPIC_ERROR_LIMIT_REACHED",
53 "ENTROPIC_ERROR_ALREADY_EXISTS",
54 "ENTROPIC_ERROR_IN_USE",
55 "ENTROPIC_ERROR_PROFILE_NOT_FOUND",
56 "ENTROPIC_ERROR_TIME_LIMIT_EXCEEDED",
57 "ENTROPIC_ERROR_VALIDATION_FAILED",
58 "ENTROPIC_ERROR_COMPACTION_FAILED",
59 "ENTROPIC_ERROR_MODEL_NOT_ACTIVE",
60 "ENTROPIC_ERROR_EVAL_CONTEXT_FULL",
61 "ENTROPIC_ERROR_EVAL_FAILED",
62 "ENTROPIC_ERROR_IMAGE_LOAD_FAILED",
63 "ENTROPIC_ERROR_IMAGE_TOO_LARGE",
64 "ENTROPIC_ERROR_MMPROJ_LOAD_FAILED",
65 "ENTROPIC_ERROR_UNSUPPORTED_URL",
66 "ENTROPIC_ERROR_NOT_SUPPORTED",
67 "ENTROPIC_ERROR_STATE_INCOMPATIBLE",
68 "ENTROPIC_ERROR_NO_VISION_TIER",
69 "ENTROPIC_ERROR_QUEUE_FULL",
70 "ENTROPIC_ERROR_SPECULATIVE_INCOMPATIBLE_ARCH",
71 "ENTROPIC_ERROR_TIER_MODEL_TOO_LARGE",
74static constexpr int s_error_count =
85 int idx =
static_cast<int>(code);
86 return (idx >= 0 && idx < s_error_count) ?
s_error_names[idx] :
"ENTROPIC_ERROR_UNKNOWN";
105 if (handle ==
nullptr) {
const char * entropic_error_name(entropic_error_t code)
Get the human-readable name for an error code.
static const char *const s_error_names[]
Lookup table: error code → name string.
entropic_error_t entropic_set_error_callback(entropic_handle_t handle, entropic_error_callback_t callback, void *user_data)
Register an error callback on a handle.
Error types for cross-.so error reporting.
void(* entropic_error_callback_t)(entropic_error_t code, const char *message, void *user_data)
Error callback type for async error reporting.
entropic_error_t
Error codes returned by all C API functions.
@ ENTROPIC_ERROR_INVALID_ARGUMENT
NULL pointer, empty string, out-of-range value.
Engine handle struct — owns all subsystems.