ccproxy.plugins.claude_sdk.handler¶
ccproxy.plugins.claude_sdk.handler
¶
Claude SDK handler for orchestrating SDK operations.
This module contains the core business logic migrated from claude_sdk_service.py, handling SDK operations while maintaining clean separation of concerns.
ClaudeSDKHandler
¶
ClaudeSDKHandler(
config,
sdk_client=None,
auth_manager=None,
metrics=None,
session_manager=None,
hook_manager=None,
)
Handler for Claude SDK operations orchestration.
This class encapsulates the business logic for SDK operations, migrated from the original claude_sdk_service.py.
Source code in ccproxy/plugins/claude_sdk/handler.py
create_completion
async
¶
create_completion(
request_context,
messages,
model,
temperature=None,
max_tokens=None,
stream=False,
session_id=None,
**kwargs,
)
Create a completion using Claude SDK with business logic orchestration.
Source code in ccproxy/plugins/claude_sdk/handler.py
validate_health
async
¶
Validate that the handler is healthy.
Source code in ccproxy/plugins/claude_sdk/handler.py
interrupt_session
async
¶
Interrupt a Claude session due to client disconnection.