Skip to content

Commit 8c58cec

Browse files
committed
feat: add Reasoning Effort, Tool Filtering, and Working Directory sections to documentation
1 parent 044a272 commit 8c58cec

1 file changed

Lines changed: 87 additions & 0 deletions

File tree

src/site/markdown/documentation.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ This guide covers common use cases for the Copilot SDK for Java. For complete AP
1212
- [Streaming Responses](#Streaming_Responses)
1313
- [Session Operations](#Session_Operations)
1414
- [Choosing a Model](#Choosing_a_Model)
15+
- [Reasoning Effort](#Reasoning_Effort)
16+
- [Tool Filtering](#Tool_Filtering)
17+
- [Working Directory](#Working_Directory)
1518
- [Connection State & Diagnostics](#Connection_State__Diagnostics)
1619
- [Message Delivery Mode](#Message_Delivery_Mode)
1720
- [Session Management](#Session_Management)
@@ -312,6 +315,90 @@ var session = client.createSession(
312315

313316
---
314317

318+
## Reasoning Effort
319+
320+
For models that support it, control how much effort the model spends reasoning before responding:
321+
322+
```java
323+
var session = client.createSession(
324+
new SessionConfig()
325+
.setModel("o3-mini")
326+
.setReasoningEffort("high")
327+
).get();
328+
```
329+
330+
| Level | Description |
331+
|-------|-------------|
332+
| `"low"` | Fastest responses, less detailed reasoning |
333+
| `"medium"` | Balanced speed and reasoning depth |
334+
| `"high"` | Thorough reasoning, slower responses |
335+
| `"xhigh"` | Maximum reasoning effort |
336+
337+
> **Note:** Only applies to reasoning models (e.g., `o3-mini`). Non-reasoning models ignore this setting.
338+
339+
---
340+
341+
## Tool Filtering
342+
343+
Control which built-in tools the assistant can use with allowlists and blocklists.
344+
345+
### Allowlist (Available Tools)
346+
347+
Restrict the session to only specific tools:
348+
349+
```java
350+
var session = client.createSession(
351+
new SessionConfig()
352+
.setAvailableTools(List.of("read_file", "search_code", "list_dir"))
353+
).get();
354+
```
355+
356+
When `availableTools` is set, the assistant can **only** use tools in this list.
357+
358+
### Blocklist (Excluded Tools)
359+
360+
Allow all tools except specific ones:
361+
362+
```java
363+
var session = client.createSession(
364+
new SessionConfig()
365+
.setExcludedTools(List.of("execute_command", "write_file"))
366+
).get();
367+
```
368+
369+
Tools in the `excludedTools` list will not be available to the assistant.
370+
371+
### Combining with Custom Tools
372+
373+
Tool filtering applies to built-in tools. Your custom tools (registered via `setTools()`) are always available:
374+
375+
```java
376+
var lookupTool = ToolDefinition.create("lookup_issue", "Fetch issue", schema, handler);
377+
378+
var session = client.createSession(
379+
new SessionConfig()
380+
.setTools(List.of(lookupTool)) // Custom tool always available
381+
.setAvailableTools(List.of("read_file")) // Only allow read_file from built-ins
382+
).get();
383+
```
384+
385+
---
386+
387+
## Working Directory
388+
389+
Set the working directory for file operations in the session:
390+
391+
```java
392+
var session = client.createSession(
393+
new SessionConfig()
394+
.setWorkingDirectory("/path/to/project")
395+
).get();
396+
```
397+
398+
This affects how the assistant resolves relative file paths when using tools like `read_file`, `write_file`, and `search_code`.
399+
400+
---
401+
315402
## Connection State & Diagnostics
316403

317404
### Checking Connection State

0 commit comments

Comments
 (0)