Skip to content

Name the CLI and the agent running it to the API (2.5.0) - #21

Merged
fatwang2 merged 2 commits into
masterfrom
request-channel-header
Nov 26, 2026
Merged

fatwang2 merged 2 commits into
masterfrom
request-channel-header

Conversation

@fatwang2

Copy link
Copy Markdown
Member

s1 now sends X-Search1API-Client: cli/<version> with every API request. If it detects a coding agent, it also sends X-Search1API-Client-App with the agent's name. Detection checks AI_AGENT first, then CLAUDECODE, CURSOR_AGENT, GEMINI_CLI, CODEX_SANDBOX/CODEX_THREAD_ID, OPENCODE, AUGMENT_AGENT and CURSOR_TRACE_ID. This lets the gateway's request analytics tell CLI and agent-skill traffic apart. Analytics only; billing and auth are not affected. Importing the package as a library sends neither header. Gateway side: fatwang2/search1api#718.

Bumps the version to 2.5.0.

Testing

  • npm test: 55 passed. New tests cover library use, agent detection, and a real s1 search against a local server.

🤖 Generated with Claude Code

王顶 and others added 2 commits November 26, 2026 10:00
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@fatwang2
fatwang2 merged commit ba706be into master Nov 26, 2026
2 checks passed
@fatwang2
fatwang2 deleted the request-channel-header branch November 26, 2026 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant