MCPcopy Create free account

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

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

↓ 4 callersMethodset_providers_config
Replaces the in-memory provider configuration. Called by `ProviderDbDiscovery` on startup and by `db_listener` whenever `providers` or `provider_mode
ai-gateway/src/app_state.rs:167
↓ 4 callersFunctionshould_observe_agent_response
( agent_enabled: bool, is_stream: bool, agent_ctx: Option<&AgentContext>, )
ai-gateway/src/logger/service.rs:77
↓ 4 callersFunctionsleep_briefly
()
examples/agent/framework_common.py:241
↓ 4 callersFunctionspawn_policy_service
(response: ValidateAgentPolicyResponse)
ai-gateway/src/agent/tools/service.rs:4222
↓ 4 callersFunctionstart_s3_mock
(put_expectation: Times)
ai-gateway/src/logger/cloud_bodies.rs:92
↓ 4 callersFunctionstate_with_allowlist
Build a minimal `AppState` with a pre-loaded allowlist (no DB needed).
ai-gateway/tests/fallback_workspace_balancer_intersection.rs:26
↓ 4 callersFunctiontemplate_messages_from_prompt_cache_json
On Redis hit with non-empty string, parse and read `template.messages` (must be an array, may be empty).
ai-gateway/src/content_filter/prompt_cache.rs:60
↓ 4 callersFunctiontest_egress_policy
()
ai-gateway/src/agent/tools/mcp_http.rs:973
↓ 4 callersFunctiontool_id_is_valid
(id: &str)
ai-gateway/src/ide_adapation/ide_ingress_adjust/cursor_openai_normalize.rs:19
↓ 4 callersFunctiontrimmed_option
(value: String)
ai-gateway/src/agent/tools/policy_evaluator.rs:74
↓ 4 callersFunctiontruthy
(value: object)
examples/agent/framework_common.py:181
↓ 4 callersMethodtry_hit_prepared
( &self, prepared: &PreparedSemanticRequest, )
ai-gateway/src/semantic_cache/service.rs:245
↓ 4 callersMethodurl
(&self)
ai-gateway/src/agent/tools/mcp_http.rs:948
↓ 4 callersFunctionusage_counts_from_response_body_for_log
(is_stream: bool, body: &[u8])
ai-gateway/src/logger/usage_parse.rs:47
↓ 4 callersFunctionuse_test_database_url
(config: &mut Config)
ai-gateway/tests/unified_api.rs:544
↓ 4 callersFunctionvalidate_initialize_result
(response: &McpInitializeResult)
ai-gateway/src/agent/tools/mcp_http.rs:73
↓ 4 callersFunctionvalidate_json_rpc_envelope
( response: &McpJsonRpcResponse<T>, expected_id: &str, )
ai-gateway/src/agent/tools/mcp_streamable_http/json_rpc.rs:47
↓ 4 callersFunctionvalidate_provider_rules
( capabilities: &ProviderCapabilities, rules: &ProviderRuleSet, )
ai-gateway/src/middleware/mapper/rule_validator.rs:73
↓ 4 callersFunctionvalue_as_i64
(v: &Value)
ai-gateway/src/logger/usage_parse.rs:249
↓ 4 callersMethodwhen
( self, retryable: RN, )
ai-gateway/src/utils/retry.rs:66
↓ 3 callersFunction_import_crewai
()
examples/agent/crewai/crewai_run.py:32
↓ 3 callersMethod_post_json
( self, path: str, payload: dict[str, Any], *, extra_headers: dict[str
examples/agent/langgraph/alephant_adapter.py:240
↓ 3 callersFunctionagent_events_request_with_auth
( event: AgentEventInput, auth_context: AuthContext, )
ai-gateway/src/agent/service.rs:1798
↓ 3 callersMethodagent_headers
(self, context: AgentStepContext)
examples/agent/langgraph/alephant_adapter.py:94
↓ 3 callersMethodapply
( &self, request: UpstreamAuthRequest<'_>, )
ai-gateway/src/dispatcher/upstream_auth.rs:69
↓ 3 callersFunctionapply_fallback
( payload: &ChatCompletionsPayload, model_source: &str, estimated_input_tokens: Option<u32>, i
ai-gateway/src/middleware/large_context/heuristics.rs:244
↓ 3 callersFunctionapply_middle_out
( payload: &ChatCompletionsPayload, primary_model: &str, input_budget_tokens: u32, )
ai-gateway/src/middleware/large_context/heuristics.rs:212
↓ 3 callersFunctionapply_payment_requirements_log_fields
( message: &mut X402PaymentLogMessage, response: &GetPaymentRequirementsResponse, )
ai-gateway/src/x402/service.rs:185
↓ 3 callersFunctionassert_first_row_matches
( last_rows: &[serde_json::Value], equals: &serde_json::Map<String, serde_json::Value>, )
crates/gateway-e2e-harness/src/ch.rs:187
↓ 3 callersFunctionassert_output_hides_internal_metadata
(output: &serde_json::Value)
ai-gateway/src/agent/tools/mcp_streamable_http.rs:869
↓ 3 callersFunctionauth_ctx_with_base_url
(base_url: Option<&str>)
ai-gateway/src/dispatcher/service.rs:1800
↓ 3 callersFunctionbase_tool_event
( auth: &AuthContext, header_context: Option<&AgentContext>, request: &ToolCallRequest, event_
ai-gateway/src/agent/tools/audit.rs:136
↓ 3 callersFunctionbody_schema_validation_error_code
(error: &BodySchemaValidationError)
ai-gateway/src/x402/service.rs:1264
↓ 3 callersFunctionbody_schema_validation_error_message
(error: &BodySchemaValidationError)
ai-gateway/src/x402/service.rs:1272
↓ 3 callersFunctionbody_schema_validation_error_response
(error: &BodySchemaValidationError)
ai-gateway/src/x402/service.rs:1282
↓ 3 callersFunctionbootstrap_provider_catalog
(app_state: &AppState)
ai-gateway/src/discover/router/provider_db.rs:43
↓ 3 callersFunctionbuild_chat_response
( id: String, model: String, content: Option<String>, tool_calls: Option<Vec<ChatCompletionMes
ai-gateway/src/middleware/mapper/response_normalizer.rs:57
↓ 3 callersFunctionbuild_llm_cache_hit_response
( entry: &alephant_llm_kv_cache::LlmCacheEntry, bucket_idx: usize, mapper_ctx: &MapperContext, )
ai-gateway/src/dispatcher/cache_coordinator.rs:50
↓ 3 callersFunctionbuild_payment_required_body
(response: &GetPaymentRequirementsResponse)
ai-gateway/src/x402/service.rs:1455
↓ 3 callersFunctionbuild_reasoning_choice
(index: u32, reasoning_content: String)
ai-gateway/src/middleware/mapper/stream_normalizer.rs:39
↓ 3 callersFunctionbuild_text_choice
(index: u32, content: String)
ai-gateway/src/middleware/mapper/stream_normalizer.rs:62
↓ 3 callersFunctionbuild_upstream_url
( original_target_url: &str, endpoint_path: &str, remaining_path: &str, query: Option<&str>, )
ai-gateway/src/x402/proxy.rs:15
↓ 3 callersFunctionbuild_usage
( prompt_tokens: u32, completion_tokens: u32, cached_tokens: Option<u32>, )
ai-gateway/src/middleware/mapper/response_normalizer.rs:9
↓ 3 callersMethodcall
(&mut self, req: Request)
ai-gateway/src/router/strategy.rs:240
↓ 3 callersMethodcan_map_model
Check if a model can be mapped to a target provider
ai-gateway/src/config/validation.rs:96
↓ 3 callersFunctioncandidate_redis_keys
(provider: &InferenceProvider, model: &ModelId)
ai-gateway/src/logger/model_info.rs:60
↓ 3 callersFunctioncatalog_redis_key
(provider_raw: &str, model_raw: &str)
ai-gateway/src/middleware/model_support/parse.rs:42
↓ 3 callersMethodcheck
`Ok(())` allows, `Err(())` rejects (rate limited).
ai-gateway/src/middleware/client_ip_rate_limit/memory.rs:37
↓ 3 callersFunctionclassify_response
( status: u16, content_type: Option<&str>, response_bytes: &[u8], )
ai-gateway/src/agent/tools/openapi/executor.rs:257
↓ 3 callersFunctioncollect_limited_request_body
( body: Body, max_bytes: usize, )
ai-gateway/src/x402/service.rs:1238
↓ 3 callersFunctioncompleted_response
( ctx: &ToolExecutionContext, target: &AgentToolTargetConfig, request: &ToolCallRequest, execu
ai-gateway/src/agent/tools/mcp_streamable_http/lifecycle.rs:1158
↓ 3 callersMethodconnect
(endpoint: String)
ai-gateway/src/x402/payment_client.rs:28
↓ 3 callersMethodcontent_filter_client
( &self, )
ai-gateway/src/app_state.rs:130
↓ 3 callersFunctioncreate_response_to_chat_request
Build a [`CreateChatCompletionRequest`] from a Responses [`CreateResponse`].
ai-gateway/src/ide_adapation/cursor_responses_openrouter_bridge.rs:203
↓ 3 callersFunctioncurrent_body_model
(payload: &parse::ChatCompletionsPayload)
ai-gateway/src/middleware/large_context/mod.rs:34
↓ 3 callersFunctiondefault_auth_context
()
ai-gateway/src/agent/policy.rs:847
↓ 3 callersFunctiondefault_named_provider_capabilities
(provider_name: &str)
ai-gateway/src/middleware/mapper/capability_data.rs:5
↓ 3 callersFunctiondefault_named_provider_rules
(provider_name: &str)
ai-gateway/src/middleware/mapper/rule_data.rs:5
↓ 3 callersMethoddel
(&self, key: &str)
ai-gateway/src/app_redis.rs:256
↓ 3 callersFunctiondescriptor_from_runtime_tool
( tool: &RuntimeTool, snapshot_revision: u64, policy_revision: u64, )
ai-gateway/src/agent/tools/catalog.rs:138
↓ 3 callersFunctiondetect_step_conflict
( redis: Option<&AppRedis>, key: &str, fingerprint: &str, ttl_secs: u64, action: AgentConf
ai-gateway/src/agent/step_state.rs:89
↓ 3 callersMethodemit_batch
( self, events: list[dict[str, Any]], *, extra_headers: dict[str, str] | None
examples/agent/langgraph/alephant_adapter.py:197
↓ 3 callersFunctionendpoint_payment_snapshot
( snapshot: &X402EndpointSnapshot, )
ai-gateway/src/x402/service.rs:1397
↓ 3 callersFunctionenrich_adapter_metadata
( metadata: &mut serde_json::Value, source: AgentEventSource, raw_event_type: &str, name: Opti
ai-gateway/src/agent/adapter.rs:730
↓ 3 callersFunctionenrich_target_gateway_metadata
( target: &AgentToolTargetConfig, request: &ToolCallRequest, response: &mut ToolCallResponse,
ai-gateway/src/agent/tools/service.rs:1182
↓ 3 callersFunctionensure_runtime_dirs
(runtime_dir: Path)
scripts/provider_mock/manage_provider_mocks.py:53
↓ 3 callersFunctionestimate_heuristic_layer_d
(payload: &ChatCompletionsPayload)
ai-gateway/src/middleware/large_context/input_token_estimate/heuristic_layer_d.rs:39
↓ 3 callersFunctionevent_text_field
( event: dict[str, Any], names: list[str], metadata_names: list[str] | None = None, )
examples/agent/tools/e2e_tool_event_loop.py:210
↓ 3 callersFunctionexecute_lifecycle_with_cache
( ctx: &ToolExecutionContext, target: &AgentToolTargetConfig, request: &ToolCallRequest, egres
ai-gateway/src/agent/tools/mcp_streamable_http/lifecycle.rs:79
↓ 3 callersFunctionexpand_placeholders
Expand `$UPPER_SNAKE` placeholders using `vars`. Missing key → error.
crates/gateway-e2e-harness/src/curl_run.rs:10
↓ 3 callersFunctionextract_endpoint_event
(sse_event: &str)
ai-gateway/src/agent/tools/mcp_sse/endpoint.rs:44
↓ 3 callersFunctionextract_fallback_model_candidates
(model: &str)
ai-gateway/src/middleware/large_context/heuristics.rs:149
↓ 3 callersFunctionextract_plain_text
(content: &InputContent)
ai-gateway/src/middleware/mapper/responses_to_chat_request.rs:224
↓ 3 callersFunctionfailed_lifecycle_response
( ctx: &ToolExecutionContext, target: &AgentToolTargetConfig, request: &ToolCallRequest, execu
ai-gateway/src/agent/tools/mcp_streamable_http/lifecycle.rs:217
↓ 3 callersFunctionfill_completion_details_from
(details: &Value, out: &mut UsageTokenCounts)
ai-gateway/src/logger/usage_parse.rs:149
↓ 3 callersFunctionforward_body_for_allowed_evaluate_response
Maps policy `EvaluateResponse` to a forward-body decision when `allowed` is already true. `piicache_forward_active` is design §3.2 (Redis `true` and n
ai-gateway/src/content_filter/evaluate.rs:71
↓ 3 callersFunctiongatewayApiKey
()
examples/agent/mastra/mastra_run.mjs:74
↓ 3 callersMethodget
(&self)
ai-gateway/src/x402/payment_client.rs:67
↓ 3 callersMethodget_master_key_ids_by_workspace_and_provider
Returns IDs of active, non-deleted master keys in the given workspace for the given provider (matched by `providers.code`). Used for workspace-level
ai-gateway/src/store/router.rs:1483
↓ 3 callersFunctionget_mock_status
(spec: MockSpec, runtime_dir: Path)
scripts/provider_mock/manage_provider_mocks.py:104
↓ 3 callersFunctionget_pid_path
(runtime_dir: Path, spec: MockSpec)
scripts/provider_mock/manage_provider_mocks.py:58
↓ 3 callersMethodhandle
(&self, request: DispatchLogRequest<'_>)
ai-gateway/src/dispatcher/dispatch_logger.rs:147
↓ 3 callersFunctionharness_with_iprl
(cfg: ClientIpRateLimitConfig)
ai-gateway/tests/client_ip_rate_limit.rs:17
↓ 3 callersFunctionheader_policy
(names: &[&str])
ai-gateway/src/x402/proxy.rs:296
↓ 3 callersFunctionhealthy_response
()
ai-gateway/src/utils/health_check.rs:93
↓ 3 callersMethodincr_remote_internal_error_count
(&self)
ai-gateway/src/discover/monitor/metrics.rs:117
↓ 3 callersMethodingest_response_snapshot
(&mut self, resp: Option<&Value>)
ai-gateway/src/ide_adapation/unified_responses_chat_compat.rs:98
↓ 3 callersFunctionis_generic_completion_event
(event_type: &str)
ai-gateway/src/agent/adapter.rs:662
↓ 3 callersFunctionlifecycle_timeout_response
( ctx: &ToolExecutionContext, target: &AgentToolTargetConfig, request: &ToolCallRequest, execu
ai-gateway/src/agent/tools/mcp_streamable_http/lifecycle.rs:239
↓ 3 callersFunctionllm_kv_slot_keys
( settings: &alephant_llm_kv_cache::CacheSettings, target_url: &url::Url, body: &Bytes, )
ai-gateway/src/dispatcher/cache_coordinator.rs:15
↓ 3 callersFunctionloadDotenv
()
examples/agent/mastra/mastra_run.mjs:15
↓ 3 callersFunctionlog_payment_grpc_request
(method: &str, request: &GrpcRequest<T>)
ai-gateway/src/x402/service.rs:418
↓ 3 callersFunctionlog_payment_grpc_response
(method: &str, response: &GrpcResponse<T>)
ai-gateway/src/x402/service.rs:436
↓ 3 callersFunctionmap_json_response_chat_to_responses
( parts: http::response::Parts, body: crate::types::body::Body, origin: &CreateResponse, )
ai-gateway/src/ide_adapation/cursor_responses_openrouter_bridge.rs:775
↓ 3 callersMethodmark_providers_bootstrapped
Records the provider bootstrap DB fingerprint for initial provider discovery.
ai-gateway/src/app_state.rs:122
↓ 3 callersMethodmark_sse_used
(&self)
ai-gateway/src/agent/tools/mcp_streamable_http/lifecycle.rs:180
↓ 3 callersMethodmatches_provider
(self, provider: &InferenceProvider)
ai-gateway/src/middleware/mapper/families.rs:29
↓ 3 callersFunctionmaybe_log_body
(scope: &'static str, body: &[u8], config: DebugLogConfig)
ai-gateway/src/utils/debug_log.rs:189
↓ 3 callersFunctionmaybe_log_headers
( scope: &'static str, headers: &http::HeaderMap, config: DebugLogConfig, )
ai-gateway/src/utils/debug_log.rs:174
↓ 3 callersFunctionmerge_prompt_cache_hit_into_body
( prompt_id_raw: &str, redis_key: &str, redis_str: &str, forward_body: Bytes, vk_metrics:
ai-gateway/src/content_filter/prompt_cache.rs:132
← previousnext →501–600 of 4,673, ranked by callers