MCPcopy Create free account

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

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

↓ 6 callersFunctionresolved_global_retry
(config: &Config)
ai-gateway/src/config/fallback_bridge.rs:99
↓ 6 callersFunctionresolved_rate_limit_restore_after
( config: &Config, retry_after_secs: Option<u64>, )
ai-gateway/src/config/fallback_bridge.rs:79
↓ 6 callersFunctionresponses_stream_response_id
(event: &Value)
ai-gateway/src/agent/tool_observer.rs:1286
↓ 6 callersFunctionresponses_stream_sequence
(event: &Value)
ai-gateway/src/agent/tool_observer.rs:1294
↓ 6 callersFunctionsample_model_mapper
()
ai-gateway/src/middleware/mapper/anthropic.rs:1066
↓ 6 callersFunctionsample_request
()
ai-gateway/src/middleware/mapper/openai_compatible.rs:516
↓ 6 callersFunctionserve_json_response
(listener: &TcpListener, body: serde_json::Value)
ai-gateway/src/agent/tools/mcp_http.rs:981
↓ 6 callersFunctionsession_key
(ctx: &ToolExecutionContext)
ai-gateway/src/agent/tools/mcp_streamable_http/session.rs:254
↓ 6 callersFunctionspawn_upstream_server
()
ai-gateway/tests/x402_sidecar.rs:828
↓ 6 callersMethodsse_url
(&self)
ai-gateway/src/agent/tools/mcp_sse/test_support.rs:198
↓ 6 callersFunctionsync_result_with_status
( status: StatusCode, )
ai-gateway/src/dispatcher/service.rs:1971
↓ 6 callersFunctiontarget
(kind: AgentToolTargetKind, url: &str)
ai-gateway/src/agent/tools/mcp_sse/target_hash.rs:60
↓ 6 callersFunctiontest_service
( hit: Option<SemanticVectorHit>, dimension: usize, )
ai-gateway/src/semantic_cache/service.rs:551
↓ 6 callersFunctiontool_execution_completed_event
( auth: &AuthContext, header_context: Option<&AgentContext>, request: &ToolCallRequest, respon
ai-gateway/src/agent/tools/audit.rs:17
↓ 6 callersFunctiontool_execution_completed_event_with_sequence
( auth: &AuthContext, header_context: Option<&AgentContext>, request: &ToolCallRequest, respon
ai-gateway/src/agent/tools/audit.rs:32
↓ 6 callersFunctiontry_map_responses_to_compatible_chat
Returns `(body, mapper_ctx, upstream_api_endpoint)` when the Cursor ↔ OpenAI-compatible **`POST /v1/responses`** → `chat/completions` bridge applies.
ai-gateway/src/ide_adapation/cursor_responses_openrouter_bridge.rs:910
↓ 6 callersMethodverify
(&self)
ai-gateway/src/tests/mock.rs:288
↓ 6 callersMethodwith_resolved_metadata
(mut self, resolved_metadata: ResolvedMapperMetadata)
ai-gateway/src/middleware/mapper/envelope.rs:78
↓ 5 callersMethod_send_json
(self, status: HTTPStatus, body: dict[str, Any])
scripts/provider_mock/mock_openai_compatible_base.py:434
↓ 5 callersFunction_trim_field
(text: str | None)
scripts/test-archival/gate_junit_captures.py:29
↓ 5 callersMethod_write_json
( self, status: int, body: dict[str, Any], *, session_id: bool = False
examples/agent/tools/mcp_streamable_mock_server.py:42
↓ 5 callersFunctionadapt_unknown_event
(source: AgentEventSource, mut event: AgentEventInput)
ai-gateway/src/agent/adapter.rs:168
↓ 5 callersFunctionapp_with_router_flags
( flags: impl IntoIterator<Item = (&'static str, bool)>, )
ai-gateway/src/middleware/model_support/service.rs:306
↓ 5 callersFunctionapply_chat_completions_body_redirect_if_needed
For `POST .../chat/completions`, if the body looks like OpenAI Responses (`input`, no top-level `messages`), route as `/responses`: update `ApiEndpoin
ai-gateway/src/ide_adapation/unified_chat_routing.rs:45
↓ 5 callersFunctionapply_ide_ingress_adjust
Applies profile-specific IDE ingress adjustments to `body`. Inserted in `map_request` after VK policy and before `RequestEnvelope` construction (see
ai-gateway/src/ide_adapation/ide_ingress_adjust/mod.rs:49
↓ 5 callersFunctionapply_model_downgrade
Replace the `"model"` field in body JSON with `new_model`. Returns `(new body, original model name)`; on invalid JSON or missing `"model"`, returns in
ai-gateway/src/content_filter/evaluate.rs:122
↓ 5 callersFunctionapply_non_stream_request_profile
( profile: &NonStreamFormatProfile, value: &mut CreateChatCompletionRequest, )
ai-gateway/src/middleware/mapper/non_stream_request_interpreter.rs:10
↓ 5 callersFunctionapply_responses_wire_normalize_for_client
( body: Bytes, profile: ClientProfile, )
ai-gateway/src/ide_adapation/responses_ingress_normalize.rs:51
↓ 5 callersFunctionassert_openai_chat_completion_shape
(body: &str)
ai-gateway/tests/single_provider.rs:146
↓ 5 callersFunctionauth_context
(workspace_id: Uuid, virtual_key_id: Uuid, department_id: Uuid)
ai-gateway/src/agent/policy.rs:854
↓ 5 callersFunctionauth_context_with_allowed
(providers: Option<Vec<InferenceProvider>>)
ai-gateway/src/middleware/model_support/service.rs:285
↓ 5 callersFunctionbuild_delta
( role: Option<Role>, content: Option<String>, tool_calls: Option<Vec<ChatCompletionMessageToolCal
ai-gateway/src/middleware/mapper/stream_normalizer.rs:22
↓ 5 callersFunctionbuild_stream_usage
(prompt_tokens: u32, completion_tokens: u32)
ai-gateway/src/middleware/mapper/stream_normalizer.rs:11
↓ 5 callersFunctionbuild_validate_agent_policy_request
( auth: &AuthContext, envelope: &AgentEventEnvelope, )
ai-gateway/src/agent/policy.rs:106
↓ 5 callersFunctioncall_model_support
( request_kind: RequestKind, body: &'static str, user_agent: Option<&'static str>,
ai-gateway/src/middleware/model_support/service.rs:320
↓ 5 callersFunctioncheck_model_access
Checks whether the requested model is permitted by the virtual key's `allowed_models` / `blocked_models` policy. Returns `Ok(())` when: - `VkPolicy`
ai-gateway/src/virtual_key/enforce.rs:25
↓ 5 callersFunctionconfig_with_rate_limit
( policy_enabled: bool, rl_enabled: bool, default_retry_after_secs: u64, restore_buffer: Durat
ai-gateway/tests/fallback_rate_limit_monitor_policy.rs:26
↓ 5 callersFunctiondecide
(input: OpenApiOutcomeInput)
ai-gateway/src/agent/tools/openapi/outcome.rs:39
↓ 5 callersFunctiondecision_from_policy_response
( envelope: &AgentEventEnvelope, response: ValidateAgentPolicyResponse, )
ai-gateway/src/agent/policy.rs:188
↓ 5 callersFunctiondecrypt_secret
( secret_ciphertext: &[u8], key: &[u8], )
ai-gateway/src/x402/secret.rs:42
↓ 5 callersFunctiondenied_policy_decision
()
ai-gateway/src/agent/policy.rs:825
↓ 5 callersFunctiondeserialize_wrapped_error_lenient
(bytes: &[u8])
ai-gateway/src/middleware/mapper/wrapped_error_lenient.rs:17
↓ 5 callersFunctiondispatch_sync
( request_builder: &reqwest::RequestBuilder, req_body_bytes: Bytes, cache_tap: Option<mpsc::Unboun
ai-gateway/src/dispatcher/sync_dispatch.rs:16
↓ 5 callersFunctionempty_request_ctx
()
ai-gateway/src/dispatcher/service.rs:1932
↓ 5 callersMethodendpoint_type
(&self)
ai-gateway/src/endpoints/mod.rs:168
↓ 5 callersFunctionendpoints
()
ai-gateway/src/ide_adapation/cursor_responses_openrouter_bridge.rs:1019
↓ 5 callersFunctionerror
(code: &str, message: &str)
ai-gateway/src/agent/tools/openapi/outcome.rs:276
↓ 5 callersFunctionexpand_policy_model_list
Expand bare `model_id` from policy into `code/model`; entries that already include `provider/` are re-normalized before deduping.
ai-gateway/src/default_model/choose.rs:281
↓ 5 callersFunctionextensions_with_policy
( allowed: Option<Vec<String>>, blocked: Option<Vec<String>>, )
ai-gateway/tests/virtual_key_enforce.rs:8
↓ 5 callersFunctionfirst_nonempty_owned
(first: Option<&str>, second: Option<&str>)
ai-gateway/src/agent/tools/audit.rs:222
↓ 5 callersMethodget_all_providers_for_gateway
Returns all enabled providers from the `providers` table. Used in Cloud mode to build `ProvidersConfig` at startup and on hot update.
ai-gateway/src/store/router.rs:539
↓ 5 callersFunctionhash_body
(body: &[u8])
ai-gateway/src/x402/proxy.rs:198
↓ 5 callersFunctionhash_sensitive
(value: &str)
ai-gateway/src/x402/log.rs:105
↓ 5 callersFunctionhost_header
(url: &Url)
ai-gateway/src/utils/mod.rs:75
↓ 5 callersMethodinner
(&self)
ai-gateway/src/x402/payment_client.rs:43
↓ 5 callersFunctioninsert_non_null_metadata_value
( metadata: &mut serde_json::Map<String, Value>, source: &Value, key: &str, )
ai-gateway/src/agent/tool_observer.rs:721
↓ 5 callersFunctionlist_request
(auth_context: AuthContext)
ai-gateway/src/agent/tools/service.rs:3948
↓ 5 callersFunctionload_dotenv
()
examples/agent/framework_common.py:185
↓ 5 callersFunctionmake_allowlist
( workspace_id: Uuid, providers: Vec<InferenceProvider>, )
ai-gateway/tests/fallback_workspace_balancer_intersection.rs:16
↓ 5 callersFunctionmake_subscriber
(recorder: RecordedEvents)
ai-gateway/tests/fallback_observability_logs.rs:73
↓ 5 callersFunctionmaybe_rewrite_async_openai_claude_model
(user_agent: &str, body: &[u8])
ai-gateway/src/middleware/model_support/service.rs:243
↓ 5 callersFunctionmodel_field_from_json_body
(body: &[u8])
ai-gateway/src/middleware/model_support/parse.rs:15
↓ 5 callersFunctionmodel_ids_from_policy_overrides_json
(v: &Value)
ai-gateway/src/default_model/resolve.rs:65
↓ 5 callersFunctionnormalize
(v: Option<&str>)
ai-gateway/src/semantic_cache/base_url_resolver.rs:123
↓ 5 callersFunctionnormalize_text
(text: &str)
ai-gateway/src/middleware/large_context/heuristics.rs:24
↓ 5 callersFunctionpayload_with_text
(text: &str)
ai-gateway/src/middleware/large_context/heuristics.rs:274
↓ 5 callersFunctionpolicy_with_emit
(emit: bool)
ai-gateway/tests/fallback_observability_logs.rs:81
↓ 5 callersFunctionprepend_messages_array
Prepend `prefix` onto `root["messages"]`; if `messages` is missing, set it to `prefix`. `prefix` must be non-empty (caller should skip when `prefix` i
ai-gateway/src/content_filter/prompt_cache.rs:87
↓ 5 callersFunctionprint_json
(value: Any)
examples/agent/openapi/client.py:172
↓ 5 callersFunctionprofile_from_response_parts
( resp_parts: &'a Parts, fallback: &'a NonStreamFormatProfile, )
ai-gateway/src/middleware/mapper/non_stream_response_interpreter.rs:24
↓ 5 callersMethodput
( &self, key: &str, value: &str, _expiration_ttl_secs: u64,
crates/alephant-llm-kv-cache/src/bucket.rs:136
↓ 5 callersFunctionrandom_id
(prefix: str)
examples/agent/tools/e2e_support.py:50
↓ 5 callersMethodraw_model_id
(&self)
ai-gateway/tests/unified_api.rs:111
↓ 5 callersMethodresponse_allows_event
(response: dict[str, Any], event_id: str)
examples/agent/langgraph/alephant_adapter.py:209
↓ 5 callersFunctionresponse_body_json
(response: http::Response<B>)
ai-gateway/tests/x402_sidecar.rs:497
↓ 5 callersFunctionresponse_json
(value: serde_json::Value)
ai-gateway/src/agent/tools/mcp_streamable_http/test_support.rs:150
↓ 5 callersFunctionresponse_parts
(response: ai_gateway::app::AppResponse)
ai-gateway/tests/single_provider.rs:133
↓ 5 callersFunctionruntime_target
(url: String, max_response_bytes: u64)
ai-gateway/src/agent/tools/openapi/executor.rs:1162
↓ 5 callersFunctionsafe_parse_metadata
(value: Any, label: str)
examples/agent/tools/e2e_tool_event_loop.py:264
↓ 5 callersFunctionsample_key
()
ai-gateway/src/x402/secret.rs:73
↓ 5 callersFunctionsample_model_mapper
()
ai-gateway/src/middleware/mapper/google.rs:243
↓ 5 callersFunctionsample_vk
(key_hash: &str, updated_at: DateTime<Utc>)
ai-gateway/src/store/db_listener.rs:691
↓ 5 callersFunctionsession
(session_id: &str)
ai-gateway/src/agent/tools/mcp_streamable_http/session.rs:539
↓ 5 callersFunctionset_mapping
( event: &mut AgentEventInput, event_type: &'static str, step_kind: AgentStepKind, phase: Agen
ai-gateway/src/agent/adapter.rs:230
↓ 5 callersMethodset_workspace_provider_allowlist
Replaces the in-memory workspace provider allowlist. Called by `ProviderDbDiscovery` at startup and by `db_listener` whenever `provider_configs` chan
ai-gateway/src/app_state.rs:209
↓ 5 callersFunctionspawn_policy_service
(response: ValidateAgentPolicyResponse)
ai-gateway/src/agent/service.rs:1920
↓ 5 callersFunctionstatic_snapshot
(workspace_id: &str, config: &AgentToolsConfig)
ai-gateway/src/agent/tools/runtime_snapshot/provider.rs:36
↓ 5 callersFunctiontest_mcp_request
(tool_call_id: &str, tool_execution_id: &str)
ai-gateway/src/agent/tools/mcp_http.rs:963
↓ 5 callersFunctiontest_mcp_sse_target
(url: &str)
ai-gateway/src/agent/tools/mcp_sse/test_support.rs:255
↓ 5 callersFunctiontest_session_for_ctx
(ctx: &ToolExecutionContext, session_id: &str)
ai-gateway/src/agent/tools/mcp_streamable_http/test_support.rs:292
↓ 5 callersFunctiontruncate_chars
(s: &str, max_chars: usize)
ai-gateway/src/middleware/mapper/wrapped_error_lenient.rs:35
↓ 5 callersFunctionuuid_or_zero
(value: &str)
ai-gateway/src/x402/service.rs:274
↓ 5 callersFunctionvalidate_agent_policy
( app_state: &AppState, auth: &AuthContext, envelope: &AgentEventEnvelope, )
ai-gateway/src/agent/policy.rs:30
↓ 5 callersFunctionvalidate_arguments
( schema: &serde_json::Value, arguments: &serde_json::Value, )
ai-gateway/src/agent/tools/schema_validator.rs:11
↓ 5 callersFunctionvalidate_json_rpc_envelope
( response: &McpJsonRpcResponse<T>, expected_id: &str, )
ai-gateway/src/agent/tools/mcp_http.rs:281
↓ 5 callersFunctionvalidate_metadata_limit
( metadata: &serde_json::Value, max_metadata_bytes: usize, )
ai-gateway/src/agent/service.rs:137
↓ 4 callersMethod_send_json
( self, status: HTTPStatus, body: dict[str, Any], )
scripts/mock_openai_8011.py:191
↓ 4 callersMethod_write_json
(self, status: int, body: dict[str, Any])
examples/agent/tools/agent_event_sink.py:83
↓ 4 callersMethodadd_rate_limit_rx
( &self, router_id: RouterId, rate_limit_rx: Receiver<RateLimitEvent>, )
ai-gateway/src/app_state.rs:390
↓ 4 callersMethodadd_rate_limit_tx
( &self, router_id: RouterId, rate_limit_tx: Sender<RateLimitEvent>, )
ai-gateway/src/app_state.rs:381
← previousnext →301–400 of 4,673, ranked by callers