You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c9f2c84
Browse filesBrowse the repository at this point in the historyBrowse files
pavelhov
authored
Merge pull request #67 from pavelhov/codex/xai-x-search-0.1.15
Copy file name to clipboardExpand all lines: docs-site/src/content/docs/reference/configuration/server.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -170,6 +170,7 @@ provider-selection behavior.
170
170
|`maxSearchesPerTurn?`|`number`|`3`| Real searches allowed per main-model turn. |
171
171
|`routedModelStallTimeoutMs?`|`number`|`200000`| Config-file-only routed-model raw-body inactivity deadline. Integer 1–2147483647; every non-empty chunk resets it. |
172
172
|`timeoutMs?`|`number`|`60000`| Deadline for one hosted search. |
173
+
|`xSearch?`|`boolean`|`true`| Adds the xAI `x_search` tool for Grok 4.7 turns on the xAI provider. `false` turns it off. See [X search for Grok 4.7](/guides/sidecars/#x-search-for-grok-47). |
173
174
174
175
The OpenAI backend requires a ChatGPT login and enabled ChatGPT `forward` provider. Claude-inbound
175
176
routed replays inject main ChatGPT auth into the internal request. The Anthropic backend uses the
Enable a Grok 4.7 Codex task to search live X posts through xAI's Responses API, retain direct source links, and ship the change through development, main, and the next authenticated macOS update.
11
+
12
+
## Requirements
13
+
- R1: Requests routed to xAI Grok 4.7 can opt into server-side `x_search` when the task asks for X research.
14
+
- R2: Normal function tools, streaming, cancellation, errors, and citations remain usable.
15
+
- R3: General web search for other providers remains unchanged.
16
+
- R4: User-facing documentation explains when X search is available and its xAI billing.
17
+
- R5: Release assets use the existing signed appcast, an incremented immutable build, and verified prior inventory.
18
+
19
+
## Key Technical Decisions
20
+
- KTD-1: Use xAI's `/v1/responses` endpoint for X research. Its documented `x_search` tool is not available on `/chat/completions`; avoid implying model selection alone enables it. Governs R1-R2.
21
+
- KTD-2: Preserve Codex's client tool calls and existing provider routes while adding the hosted xAI tool only for eligible xAI requests. Governs R1-R3.
22
+
- KTD-3: Complete feature PR to `development`, then promote via PR to `main` before the release. Governs R5.
23
+
24
+
## Implementation Units
25
+
### U1: xAI hosted search path
26
+
Inspect `src/providers/registry.ts`, `src/adapters/openai-chat.ts`, `src/adapters/openai-responses.ts`, `src/responses/parser.ts`, `src/bridge.ts`, and `src/web-search/`. Add the smallest sound xAI Responses routing and `x_search` handling. Add focused regression tests in `tests/` for tool injection, X source links, non-X routes, errors, and streaming/cancellation. Depends on no other unit. Covers R1-R3.
27
+
28
+
### U2: User documentation
29
+
Update the relevant `docs-site/` provider/search documentation and translations so they accurately describe availability, cost, and setup. Depends on U1. Covers R4.
30
+
31
+
### U3: Integration and update
32
+
Run `bun run typecheck`, focused tests, `bun run test:parallel`, `bun run privacy:scan`, docs build, and applicable app checks. Review security implications of sending task content to xAI and preserving citations. Merge the feature to `development`, promote to `main` after CI, package the signed macOS update, generate and verify its appcast, then publish and verify release assets. Depends on U1-U2. Covers R5.
33
+
34
+
## Verification Contract
35
+
The existing non-xAI adapter behavior is preserved. Focused tests prove that a Grok X research request carries `x_search` to xAI Responses and returns verifiable post URLs. Full repository checks and PR CI pass. The release asset is signed, feed verification passes, and the published fixed appcast URL serves the new version.
36
+
37
+
## Definition of Done
38
+
The feature is on both `development` and `main`; a new macOS release is published with an authenticated update; the user can update and test X search from the app.
0 commit comments