Open History to see the last commit
1---
2id: DebugConfig
3title: DebugConfig
4---
5
6Defined in: [packages/ai/src/logger/types.ts:73](https://github.com/TanStack/ai/blob/main/packages/ai/src/logger/types.ts#L73)
7
8Granular debug configuration combining per-category toggles with an optional custom logger. Any unspecified category flag defaults to `true`.
9
10## Extends
11
12- [`DebugCategories`](DebugCategories.md)
13
14## Properties
15
16### agentLoop?
17
18```ts
19optional agentLoop?: boolean;
20```
21
22Defined in: [packages/ai/src/logger/types.ts:50](https://github.com/TanStack/ai/blob/main/packages/ai/src/logger/types.ts#L50)
23
24Iteration markers and phase transitions in the chat agent loop. Chat-only.
25
26#### Inherited from
27
28[`DebugCategories`](DebugCategories.md).[`agentLoop`](DebugCategories.md#agentloop)
29
30***
31
32### config?
33
34```ts
35optional config?: boolean;
36```
37
38Defined in: [packages/ai/src/logger/types.ts:54](https://github.com/TanStack/ai/blob/main/packages/ai/src/logger/types.ts#L54)
39
40Config transforms returned by middleware `onConfig` hooks. Chat-only.
41
42#### Inherited from
43
44[`DebugCategories`](DebugCategories.md).[`config`](DebugCategories.md#config)
45
46***
47
48### errors?
49
50```ts
51optional errors?: boolean;
52```
53
54Defined in: [packages/ai/src/logger/types.ts:58](https://github.com/TanStack/ai/blob/main/packages/ai/src/logger/types.ts#L58)
55
56Caught errors throughout the pipeline. Unlike other categories, defaults to `true` even when `debug` is unspecified. Explicitly set `errors: false` or `debug: false` to silence.
57
58#### Inherited from
59
60[`DebugCategories`](DebugCategories.md).[`errors`](DebugCategories.md#errors)
61
62***
63
64### logger?
65
66```ts
67optional logger?: Logger;
68```
69
70Defined in: [packages/ai/src/logger/types.ts:77](https://github.com/TanStack/ai/blob/main/packages/ai/src/logger/types.ts#L77)
71
72Custom `Logger` implementation. When omitted, a default `ConsoleLogger` routes output to `console.debug`/`info`/`warn`/`error`.
73
74***
75
76### middleware?
77
78```ts
79optional middleware?: boolean;
80```
81
82Defined in: [packages/ai/src/logger/types.ts:42](https://github.com/TanStack/ai/blob/main/packages/ai/src/logger/types.ts#L42)
83
84Inputs and outputs around each middleware hook invocation. Chat-only.
85
86#### Inherited from
87
88[`DebugCategories`](DebugCategories.md).[`middleware`](DebugCategories.md#middleware)
89
90***
91
92### output?
93
94```ts
95optional output?: boolean;
96```
97
98Defined in: [packages/ai/src/logger/types.ts:38](https://github.com/TanStack/ai/blob/main/packages/ai/src/logger/types.ts#L38)
99
100Chunks/results yielded to the consumer after all middleware. For streaming activities this fires per chunk; for non-streaming activities it fires once per result.
101
102#### Inherited from
103
104[`DebugCategories`](DebugCategories.md).[`output`](DebugCategories.md#output)
105
106***
107
108### provider?
109
110```ts
111optional provider?: boolean;
112```
113
114Defined in: [packages/ai/src/logger/types.ts:34](https://github.com/TanStack/ai/blob/main/packages/ai/src/logger/types.ts#L34)
115
116Raw chunks/frames received from a provider SDK (OpenAI, Anthropic, Gemini, Ollama, Grok, Groq, OpenRouter, fal, ElevenLabs, BytePlus). Emitted inside every streaming adapter's chunk loop.
117
118#### Inherited from
119
120[`DebugCategories`](DebugCategories.md).[`provider`](DebugCategories.md#provider)
121
122***
123
124### request?
125
126```ts
127optional request?: boolean;
128```
129
130Defined in: [packages/ai/src/logger/types.ts:62](https://github.com/TanStack/ai/blob/main/packages/ai/src/logger/types.ts#L62)
131
132Outgoing call metadata (provider, model, message/tool counts) emitted before each adapter SDK call.
133
134#### Inherited from
135
136[`DebugCategories`](DebugCategories.md).[`request`](DebugCategories.md#request)
137
138***
139
140### sandbox?
141
142```ts
143optional sandbox?: boolean;
144```
145
146Defined in: [packages/ai/src/logger/types.ts:67](https://github.com/TanStack/ai/blob/main/packages/ai/src/logger/types.ts#L67)
147
148Sandbox internals: watcher start/stop + mechanism, file events, sandbox
149hook dispatch, ensure/bootstrap and lifecycle transitions. Chat-only.
150
151#### Inherited from
152
153[`DebugCategories`](DebugCategories.md).[`sandbox`](DebugCategories.md#sandbox)
154
155***
156
157### tools?
158
159```ts
160optional tools?: boolean;
161```
162
163Defined in: [packages/ai/src/logger/types.ts:46](https://github.com/TanStack/ai/blob/main/packages/ai/src/logger/types.ts#L46)
164
165Before/after tool-call execution in the chat agent loop. Chat-only.
166
167#### Inherited from
168
169[`DebugCategories`](DebugCategories.md).[`tools`](DebugCategories.md#tools)