Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

DebugConfig.md

171 lines4.3 KB

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