ccproxy.plugins.claude_api.detection_service¶
ccproxy.plugins.claude_api.detection_service
¶
Claude API plugin detection service using centralized detection.
ClaudeAPIDetectionService
¶
Claude API plugin detection service for automatically detecting Claude CLI headers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings
|
Settings
|
Application settings |
required |
cli_service
|
CLIDetectionService | None
|
Optional CLIDetectionService instance for dependency injection. If None, creates a new instance for backward compatibility. |
None
|
Source code in ccproxy/plugins/claude_api/detection_service.py
initialize_detection
async
¶
Initialize Claude detection at startup.
Source code in ccproxy/plugins/claude_api/detection_service.py
get_cached_data
¶
get_detected_headers
¶
Return cached headers as structured data.
get_detected_prompts
¶
Return cached prompt metadata as structured data.
get_ignored_headers
¶
get_redacted_headers
¶
get_cli_health_info
¶
Get lightweight CLI health info using centralized detection, cached locally.
Returns:
| Type | Description |
|---|---|
ClaudeCliInfo
|
ClaudeCliInfo with availability, version, and binary path |
Source code in ccproxy/plugins/claude_api/detection_service.py
get_version
¶
get_cli_path
¶
get_binary_path
¶
invalidate_cache
¶
Clear all cached detection data.
Source code in ccproxy/plugins/claude_api/detection_service.py
get_system_prompt
¶
Return a system prompt dict for injection based on cached prompts.
mode: "none", "minimal", or "full"