MCPcopy Index your code
hub / github.com/github/copilot-sdk / register_client_global_api_handlers

Function register_client_global_api_handlers

python/copilot/generated/rpc.py:27075–27105  ·  view source on GitHub ↗

Register client-global request handlers on a JSON-RPC connection. Unlike client-session handlers these methods carry no implicit session_id dispatch key; a single set of handlers serves the entire connection.

(
    client: "JsonRpcClient",
    handlers: ClientGlobalApiHandlers,
)

Source from the content-addressed store, hash-verified

27073 git_hub_telemetry: GitHubTelemetryHandler | None = None
27074
27075def register_client_global_api_handlers(
27076 client: "JsonRpcClient",
27077 handlers: ClientGlobalApiHandlers,
27078) -> None:
27079 """Register client-global request handlers on a JSON-RPC connection.
27080
27081 Unlike client-session handlers these methods carry no implicit
27082 session_id dispatch key; a single set of handlers serves the entire
27083 connection.
27084 """
27085 async def handle_llm_inference_http_request_start(params: dict) -> dict | None:
27086 request = LlmInferenceHTTPRequestStartRequest.from_dict(params)
27087 handler = handlers.llm_inference
27088 if handler is None: raise RuntimeError("No llm_inference client-global handler registered")
27089 result = await handler.http_request_start(request)
27090 return result.to_dict()
27091 client.set_request_handler("llmInference.httpRequestStart", handle_llm_inference_http_request_start)
27092 async def handle_llm_inference_http_request_chunk(params: dict) -> dict | None:
27093 request = LlmInferenceHTTPRequestChunkRequest.from_dict(params)
27094 handler = handlers.llm_inference
27095 if handler is None: raise RuntimeError("No llm_inference client-global handler registered")
27096 result = await handler.http_request_chunk(request)
27097 return result.to_dict()
27098 client.set_request_handler("llmInference.httpRequestChunk", handle_llm_inference_http_request_chunk)
27099 async def handle_git_hub_telemetry_event(params: dict) -> dict | None:
27100 request = GitHubTelemetryNotification.from_dict(params)
27101 handler = handlers.git_hub_telemetry
27102 if handler is None: raise RuntimeError("No git_hub_telemetry client-global handler registered")
27103 await handler.event(request)
27104 return None
27105 client.set_request_handler("gitHubTelemetry.event", handle_git_hub_telemetry_event)
27106
27107__all__ = [
27108 "APIKeyAuthInfo",

Callers 1

Calls 1

set_request_handlerMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…