MCPcopy Create free account

hub / github.com/AlephantAI/AIephant-AI-Agent-Gateway / functions

Functions4,673 in github.com/AlephantAI/AIephant-AI-Agent-Gateway

↓ 8 callersFunctionbuild_tool_call_chunk
( index: u32, id: Option<String>, name: Option<String>, arguments: Option<String>, )
ai-gateway/src/middleware/mapper/stream_normalizer.rs:72
↓ 8 callersMethodcall_tool
( self, *, tool_id: str, arguments: dict[str, Any], step_id: str = "st
examples/agent/openapi/client.py:85
↓ 8 callersMethodcall_with_refresh_once
( self, *, tool_id: str, arguments: dict[str, Any], )
examples/agent/openapi/client.py:111
↓ 8 callersFunctionchat_sse_done
()
ai-gateway/src/agent/tool_observer.rs:1460
↓ 8 callersFunctionexecute_mcp_http_tool
( target: &AgentToolTargetConfig, request: &ToolCallRequest, egress_policy: &AgentToolEgressPolicy
ai-gateway/src/agent/tools/mcp_http.rs:135
↓ 8 callersFunctionextract_foldable_text_from_block
Pull plain text from extended / provider-specific assistant content blocks.
ai-gateway/src/ide_adapation/ide_ingress_adjust/cursor_openai_normalize.rs:52
↓ 8 callersFunctionfind_json_rpc_response
( sse_text: &str, expected_id: &str, limits: &SseLimits, )
ai-gateway/src/agent/tools/mcp_streamable_http/sse.rs:131
↓ 8 callersMethodget_string
(&self, key: &str)
ai-gateway/src/app_redis.rs:185
↓ 8 callersFunctionhash_key
(key: &str)
ai-gateway/src/virtual_key/legacy_key.rs:12
↓ 8 callersFunctionimport_adapter_module
()
examples/agent/langgraph/test_examples.py:23
↓ 8 callersFunctioninsert_optional
(metadata: &mut serde_json::Value, key: &'static str, value: &Option<String>)
ai-gateway/src/agent/tools/audit.rs:333
↓ 8 callersMethodlist_tools
(self)
examples/agent/openapi/client.py:72
↓ 8 callersFunctionlocal_openapi_egress_policy
()
ai-gateway/src/agent/tools/service.rs:4293
↓ 8 callersFunctionmark_gateway_metadata
(response: &mut ToolCallResponse, cache_hit: bool, reinitialized: bool)
ai-gateway/src/agent/tools/mcp_streamable_http/lifecycle.rs:1151
↓ 8 callersFunctionparse_agent_context_from_headers
( headers: &HeaderMap, max_value_bytes: usize, )
ai-gateway/src/agent/headers.rs:46
↓ 8 callersMethodprocess_upstream_chat_chunk
( &mut self, chunk: &CreateChatCompletionStreamResponse, raw: &Value, )
ai-gateway/src/ide_adapation/cursor_responses_openrouter_bridge.rs:476
↓ 8 callersFunctionresolve_cloud_log_bodies
Cloud-only: when **both** bodies are below 1 MiB, inline UTF-8 strings for `ClickHouse`. When **either** body is at least 1 MiB, **`storage_location`
ai-gateway/src/logger/cloud_bodies.rs:22
↓ 8 callersFunctionroute_request
( path: &str, body: serde_json::Value, explicit_client_model: bool, )
ai-gateway/src/router/unified_route_planner.rs:247
↓ 8 callersFunctionrun_server
(config: ProviderMockConfig)
scripts/provider_mock/mock_openai_compatible_base.py:483
↓ 8 callersFunctionschema_hash_for_value
(input_schema: &serde_json::Value)
ai-gateway/src/agent/tools/catalog.rs:132
↓ 8 callersFunctionservice
()
ai-gateway/src/router/router_details.rs:251
↓ 8 callersMethodset
()
ai-gateway/tests/unified_api.rs:404
↓ 8 callersFunctionspawn_payment_service
(calls: Arc<AtomicUsize>)
ai-gateway/tests/x402_sidecar.rs:695
↓ 8 callersFunctionspawn_policy_service
(calls: Arc<AtomicUsize>)
ai-gateway/tests/x402_sidecar.rs:629
↓ 8 callersFunctionspawn_redis_fixture
(values: &[(String, String)])
ai-gateway/tests/x402_sidecar.rs:868
↓ 8 callersFunctionstart_mock_for_test
( stub_path: &str, global_delay: Option<u64>, stubs: Option<&HashMap<&'static str, Times>>, ve
ai-gateway/src/tests/mock.rs:378
↓ 8 callersFunctionstatic_target
(url: String)
ai-gateway/src/agent/tools/openapi/executor.rs:1148
↓ 8 callersFunctiontest_request
()
ai-gateway/src/agent/tools/mcp_streamable_http/test_support.rs:247
↓ 8 callersFunctionwaived_failure
( status: ToolExecutionStatus, currency: String, dedupe_key: String, failure_stage: &str,
ai-gateway/src/agent/tools/openapi/outcome.rs:215
↓ 8 callersFunctionx402_config
(policy_endpoint: &str, payment_endpoint: &str, redis_endpoint: &str)
ai-gateway/tests/x402_sidecar.rs:475
↓ 7 callersMethod_debug_enabled
(self, target: str, headers: dict[str, str])
examples/agent/langgraph/alephant_adapter.py:308
↓ 7 callersMethod_json
(self, status: int, payload: dict[str, object])
examples/agent/openapi/support_api_mock.py:91
↓ 7 callersFunctionapply_auth_scope_to_observed_tool_event
( envelope: &mut AgentEventEnvelope, workspace_id: impl ToString, virtual_key_id: Option<Uuid>, )
ai-gateway/src/logger/service.rs:483
↓ 7 callersFunctionapply_verify_and_settle_log_fields
( message: &mut X402PaymentLogMessage, response: &VerifyAndSettlePaymentResponse, )
ai-gateway/src/x402/service.rs:222
↓ 7 callersMethodas_ref
(&self)
crates/weighted-balance/src/weight.rs:31
↓ 7 callersFunctionbuild_tool_choice
( index: u32, tool_call: ChatCompletionMessageToolCallChunk, )
ai-gateway/src/middleware/mapper/stream_normalizer.rs:87
↓ 7 callersMethodcompletion_id
(&self)
ai-gateway/src/ide_adapation/unified_responses_chat_compat.rs:110
↓ 7 callersFunctionconvert_responses_body
( converter: super::OpenAICompatibleConverter, body: serde_json::Value, )
ai-gateway/src/middleware/mapper/openai_compatible.rs:566
↓ 7 callersMethoddelete
(&self, key: &str)
ai-gateway/src/agent/tools/mcp_streamable_http/session.rs:67
↓ 7 callersFunctiondescriptor_by_tool_id
(list_response: dict[str, Any], tool_id: str)
examples/agent/openapi/client.py:177
↓ 7 callersFunctionendpoint_snapshot_redis_key
(slug: &str, method: &str)
ai-gateway/src/x402/snapshot.rs:53
↓ 7 callersFunctionensure_openai_chat_completion_required_fields_in_place
Fills required top-level keys for `CreateChatCompletionResponse` / `CreateChatCompletionStreamResponse` when upstream omits them. Each patch is logged
ai-gateway/src/middleware/mapper/chat_completion_role_normalize.rs:103
↓ 7 callersMethodgateway_models_for_bare_id
(&self, bare_trimmed: &str)
ai-gateway/src/discover/router/bare_model_expand_index.rs:32
↓ 7 callersMethodinto_events
(self)
ai-gateway/src/agent/event.rs:27
↓ 7 callersFunctionjoin_provider_upstream_url
(base_url: &url::Url, path_and_query: &str)
ai-gateway/src/dispatcher/target_endpoint.rs:181
↓ 7 callersMethodmodel_name
(&self)
ai-gateway/src/ide_adapation/unified_responses_chat_compat.rs:116
↓ 7 callersFunctionnon_stream_responses_body_to_chat_completion
(body: &[u8])
ai-gateway/src/ide_adapation/unified_responses_chat_compat.rs:445
↓ 7 callersFunctionoptional_str_conflicts
(left: Option<&str>, right: Option<&str>)
ai-gateway/src/agent/service.rs:543
↓ 7 callersFunctionparse_date
(input: &str)
ai-gateway/src/types/model_id.rs:622
↓ 7 callersFunctionparse_large_context_headers
( headers: &HeaderMap, )
ai-gateway/src/middleware/large_context/headers.rs:55
↓ 7 callersMethodprepare_request
( &self, path: &str, headers: &HeaderMap, body: &[u8], )
ai-gateway/src/semantic_cache/service.rs:203
↓ 7 callersFunctionregister_stubs_for_mock
( mock: &Stubr, stub_path: &str, global_latency: Option<u64>, stubs: &HashMap<&'static str, Ti
ai-gateway/src/tests/mock.rs:422
↓ 7 callersFunctionrequest_ctx
( auth_context: Option<AuthContext>, router_config: Option<RouterConfig>, )
ai-gateway/src/dispatcher/target_endpoint.rs:252
↓ 7 callersFunctionresolved_health_monitor_config
(config: &Config)
ai-gateway/src/config/fallback_bridge.rs:51
↓ 7 callersFunctionresolver
(config: Config)
ai-gateway/src/dispatcher/target_endpoint.rs:265
↓ 7 callersFunctionresponse_parts
(response: AppResponse)
ai-gateway/tests/unified_api.rs:867
↓ 7 callersFunctionsample_key
()
ai-gateway/src/crypto/master_key.rs:67
↓ 7 callersFunctionsplit_provider_model
Split `provider/model` on the first `/`. Fails if `/` is missing or a side is empty after trim.
ai-gateway/src/middleware/model_support/parse.rs:27
↓ 7 callersFunctiontest_egress_policy
()
ai-gateway/src/agent/tools/executor.rs:413
↓ 7 callersFunctiontest_snapshot
()
ai-gateway/src/x402/service.rs:1645
↓ 7 callersFunctionupsert_virtual_key_entry
(map: &mut HashMap<String, DbVirtualKey>, vk: DbVirtualKey)
ai-gateway/src/app_state.rs:646
↓ 7 callersFunctionvisible_tools
( auth: &AuthContext, targets: &[AgentToolTargetConfig], _reported_agent_id: Option<&str>, def
ai-gateway/src/agent/tools/catalog.rs:16
↓ 7 callersFunctionwith_master_key_env
(val: Option<&str>, f: impl FnOnce() -> T)
ai-gateway/src/crypto/master_key_config.rs:55
↓ 6 callersMethod_write_empty
(self, status: HTTPStatus)
examples/agent/mcp_sse/mcp_sse_mock_server.py:128
↓ 6 callersMethodas_provider_code
(&self)
ai-gateway/src/types/provider.rs:106
↓ 6 callersMethodas_str
(&self)
ai-gateway/src/agent/tool_observer.rs:38
↓ 6 callersFunctionattach_policy_decision_to_metadata
( metadata: &mut serde_json::Value, decision: &AgentPolicyDecision, )
ai-gateway/src/agent/policy.rs:279
↓ 6 callersFunctionauth_context_with_virtual_key
(virtual_key_id: Uuid)
ai-gateway/src/agent/tools/catalog.rs:616
↓ 6 callersFunctionbaseEvent
(type, { agentId, runId, agentName, metadata = {}, ...rawFields })
examples/agent/mastra/mastra_run.mjs:83
↓ 6 callersFunctionbilling
( billable: bool, cost_micros: u64, currency: String, dedupe_key: String, reason: &str, )
ai-gateway/src/agent/tools/openapi/outcome.rs:256
↓ 6 callersFunctionbuild_cache_key
( path: &str, body: &[u8], embedder_identity: &str, )
ai-gateway/src/semantic_cache/key_builder.rs:11
↓ 6 callersMethodcall
(&mut self, req: Request<ReqBody>)
ai-gateway/src/middleware/response_headers.rs:42
↓ 6 callersFunctioncontext
(virtual_key_id: Option<&str>)
ai-gateway/src/agent/tools/mcp_streamable_http/session.rs:517
↓ 6 callersFunctionconvert_anthropic_response
( profile: &NonStreamFormatProfile, value: anthropic::CreateMessageResponse, )
ai-gateway/src/middleware/mapper/non_stream_response_interpreter.rs:42
↓ 6 callersFunctionconvert_bedrock_stream_chunk
( value: aws_sdk_bedrockruntime::types::ConverseStreamOutput, )
ai-gateway/src/middleware/mapper/bedrock.rs:801
↓ 6 callersFunctioncreate_mock_service
( response_fn: F, )
ai-gateway/src/middleware/response_headers.rs:122
↓ 6 callersFunctiondebug_body_preview_with_limit
(body: &[u8], max_log_bytes: usize)
ai-gateway/src/utils/debug_log.rs:109
↓ 6 callersFunctiondebug_env_flag_enabled
(name: &str)
ai-gateway/src/x402/service.rs:373
↓ 6 callersFunctiondecision
( status: ToolExecutionStatus, error: Option<ToolExecutionErrorEnvelope>, billing: ToolBillingOver
ai-gateway/src/agent/tools/openapi/outcome.rs:236
↓ 6 callersFunctionevent_tokens
(event_type: &str)
ai-gateway/src/agent/adapter.rs:647
↓ 6 callersFunctionexecute_runtime_openapi_tool
( target: &RuntimeOpenApiTarget, method: &str, request: &ToolCallRequest, egress_policy: &Agen
ai-gateway/src/agent/tools/openapi/executor.rs:72
↓ 6 callersFunctionexecute_tool_with_context
( ctx: &ToolExecutionContext, target: &AgentToolTargetConfig, request: &ToolCallRequest, egres
ai-gateway/src/agent/tools/executor.rs:156
↓ 6 callersFunctionfiltered_upstream_headers
( inbound: &HeaderMap, policy: &[X402TargetHeaderPolicyItem], )
ai-gateway/src/x402/proxy.rs:112
↓ 6 callersFunctionget_retry_config
( app_state: &'a AppState, request_kind: RequestKind, _req_ctx: &RequestContext, )
ai-gateway/src/dispatcher/service.rs:1763
↓ 6 callersFunctionimport_script
(framework: str, script_name: str)
examples/agent/test_framework_adapters.py:59
↓ 6 callersMethodincr
(&self)
ai-gateway/src/metrics/rolling_counter.rs:42
↓ 6 callersFunctioninsert_optional_value
(metadata: &mut serde_json::Value, key: &'static str, value: Option<T>)
ai-gateway/src/agent/tools/audit.rs:339
↓ 6 callersFunctionnormalize_chat_completion_roles_in_place
`stream_chunk`: true → normalize `choices[].delta.role`; false → `choices[].message.role`. Only walks `choices` when `root` is an Object and `choices
ai-gateway/src/middleware/mapper/chat_completion_role_normalize.rs:30
↓ 6 callersFunctionobserve_responses_nonstream_agent_items
(body: &[u8])
ai-gateway/src/agent/tool_observer.rs:535
↓ 6 callersFunctionparse_embedding_identity
(raw: &str)
ai-gateway/src/semantic_cache/embedding_identity.rs:26
↓ 6 callersFunctionparse_session_headers
( headers: &HeaderMap, )
ai-gateway/src/session_headers.rs:43
↓ 6 callersFunctionpayment_error_response
( status: StatusCode, message: impl Into<String>, code: &'static str, )
ai-gateway/src/x402/service.rs:1483
↓ 6 callersFunctionpayment_grpc_request_with_auth
( body: T, payment_service_key: &str, )
ai-gateway/src/x402/service.rs:377
↓ 6 callersMethodping
(&self)
ai-gateway/src/app_redis.rs:51
↓ 6 callersFunctionprepare_request_envelope
( mut envelope: RequestEnvelope, )
ai-gateway/src/middleware/mapper/request_rule_engine.rs:33
↓ 6 callersMethodpush_role_if_needed
(&mut self, buf: &mut BytesMut)
ai-gateway/src/ide_adapation/unified_responses_chat_compat.rs:120
↓ 6 callersMethodreceive
(self)
ai-gateway/src/agent/log_transport.rs:442
↓ 6 callersFunctionremember_region
( app_state: &AppState, master_key_id: Option<Uuid>, region: EndpointRegion, )
ai-gateway/src/dispatcher/regional_endpoint.rs:91
↓ 6 callersFunctionresolve_agent_name
( registered_agent_name: Option<&str>, event_agent_name: Option<&str>, header_agent_name: Option<&
ai-gateway/src/agent/name.rs:36
↓ 6 callersFunctionresolve_message_endpoint
( sse_url: &str, endpoint: &str, )
ai-gateway/src/agent/tools/mcp_sse/endpoint.rs:11
← previousnext →201–300 of 4,673, ranked by callers