MCPcopy Create free account

hub / github.com/NVIDIA-NeMo/Switchyard / functions

Functions4,886 in github.com/NVIDIA-NeMo/Switchyard

↓ 6 callersMethodfinish
Finishes target-provider stream emission after the source stream closes.
crates/switchyard-translation/src/codecs/stream.rs:205
↓ 6 callersFunctioniter_chat_completion_sse
Serialize a Chat Completions chunk stream to OpenAI-style SSE frames. Accepts any async iterator of objects with ``model_dump()`` (OpenAI SDK
switchyard/lib/endpoints/sse_helpers.py:59
↓ 6 callersMethodmake_classifier_config
Return an :class:`LLMClassifierConfig` with this profile's prompt baked in. ``disable_reasoning=None`` (default) auto-detects from ``model``
switchyard/lib/processors/llm_classifier/presets.py:249
↓ 6 callersFunctionmake_responses_text_delta
(*, delta: str = "hi")
tests/test_chat_response.py:132
↓ 6 callersMethodnoop
(chunk: ChatCompletionChunk)
tests/test_chat_response.py:410
↓ 6 callersMethodnow
Captures the current monotonic clock instant.
crates/switchyard-components/src/stats/context.rs:20
↓ 6 callersMethodprocess
Extracts the tool-result signal and stores it on the request context.
crates/switchyard-components/src/request_processors/dimension_collector.rs:46
↓ 6 callersFunctionprovider_extensions
Copies unknown provider fields into the IR extension map.
crates/switchyard-translation/src/codecs/common.rs:45
↓ 6 callersMethodrecord
(&mut self, latency_ms: f64)
crates/switchyard-server/src/stats/accumulator.rs:302
↓ 6 callersFunctionrecord_upstream_attempt_failure
Record one failed ``switchyard_upstream_attempts_total`` when attributable. Counts an attempt only for failures attributable to the upstream call
switchyard/lib/endpoints/upstream_error.py:64
↓ 6 callersFunctionrecording_router
( client: Arc<RecordingClient>, config: StageRouterConfig, )
crates/libsy/src/algorithms/stage.rs:423
↓ 6 callersFunctionrender_prometheus
Render a stats snapshot as Prometheus text-format exposition. Args: snapshot: The dict returned by :meth:`StatsAccumulator.snapshot_sync`
switchyard/lib/prometheus_exposition.py:41
↓ 6 callersFunctionrequest
()
crates/libsy/src/algorithms/fall_through.rs:679
↓ 6 callersFunctionresponse_type_value
Normalize response-format tags and wire strings.
switchyard_rust/core.py:662
↓ 6 callersFunctionrun_turn
Drives a shared router through one turn in the default test session.
crates/libsy/src/algorithms/fall_through.rs:713
↓ 6 callersMethodsafe_load
(self, stream: str)
switchyard/cli/route_bundle.py:308
↓ 6 callersMethodshutdown
(self)
tests/test_switchyard_app_lifecycle.py:38
↓ 6 callersFunctionsse_frame_payloads
Parse an SSE frame string into its JSON ``data:`` payload(s). Follows the SSE contract: a frame's ``data:`` lines are joined with newlines to
switchyard_rust/translation.py:443
↓ 6 callersMethodtarget_ids
(&self)
crates/switchyard-py/src/component_bindings/backends.rs:227
↓ 6 callersFunctiontiers
Tiers named the way a deployment would name them.
crates/libsy/src/algorithms/util/stage.rs:603
↓ 6 callersMethodtranslate_stream
Translate an async stream between provider event formats. Closes *stream* on every exit path. When the client disconnects, the ASGI s
switchyard_rust/translation.py:215
↓ 6 callersFunctionturn_request
(failed: bool)
crates/libsy/src/algorithms/stage.rs:454
↓ 6 callersMethodvalidate
( &self, candidate: &SkillCandidate, evaluation: &[Trajectory], )
crates/switchyard-skill-distillation/tests/contracts.rs:154
↓ 6 callersMethodwith_name
Sets the stable, low-cardinality telemetry name for this composition.
crates/libsy/src/algorithms/fall_through.rs:173
↓ 5 callersMethod__anext__
(self)
tests/test_stream_close_chain.py:54
↓ 5 callersFunction_aclose_stream
Best-effort close of an upstream response stream. On every exit path — normal completion, mid-stream error, or the client disconnecting (whic
switchyard/lib/endpoints/sse_helpers.py:36
↓ 5 callersFunction_anthropic_req
()
tests/test_request_translation_engine_to_any_of.py:33
↓ 5 callersFunction_backend
Build the deterministic profile and return its dispatch backend.
tests/test_deterministic_routing_cache_wrapping.py:71
↓ 5 callersFunction_c
(code: str, text: str, enabled: bool)
switchyard/cli/launchers/launcher_runtime.py:178
↓ 5 callersFunction_config
( *, strong_format: BackendFormat, weak_format: BackendFormat = BackendFormat.OPENAI, enable_s
tests/test_deterministic_routing_cache_wrapping.py:29
↓ 5 callersFunction_config_path
Resolve the selected deployment, defaulting to the packaged OpenRouter config.
switchyard/cli/launch_command.py:14
↓ 5 callersFunction_config_with_escalation
(escalate: bool)
tests/test_signal_tier_selector_request_processor.py:380
↓ 5 callersFunction_footer
(stats: StatsAccumulator, *, model: str = "nvidia/some/default")
tests/test_live_stats_footer.py:58
↓ 5 callersFunction_openai_req
()
tests/test_request_translation_engine_to_any_of.py:26
↓ 5 callersFunction_request
()
tests/test_rl_logging.py:33
↓ 5 callersFunction_responses_items_to_messages
(items: list)
tests/test_codex_multiturn_traces.py:29
↓ 5 callersFunction_routed_ctx
A context shaped like one a router leaves behind for the terminal role.
tests/test_response_translation_engine.py:270
↓ 5 callersFunction_strip_unsupported_output_config
Drop ``output_config.format`` from an inbound Anthropic body in place. Claude Code 2.1.1x sends ``output_config.format`` (a structured-output
switchyard/lib/endpoints/anthropic_messages_endpoint.py:50
↓ 5 callersFunction_stub_classifier
(tier: str | None)
tests/test_stage_router_pickers.py:82
↓ 5 callersFunction_system_messages
(result: dict)
tests/test_anthropic_openai_translation.py:28
↓ 5 callersFunction_target_value
( raw: object, defaults: Mapping[str, object], default_id: str, where: str, )
switchyard/cli/route_bundle.py:1122
↓ 5 callersFunction_translate_anthropic_request_to_openai
( *, messages: Iterable[Mapping[str, Any]], **kwargs: Any, )
tests/test_anthropic_openai_translation.py:16
↓ 5 callersFunctionalgo
(name: &str, model: &str, client: Option<Arc<dyn RoutedLlmClient>>)
crates/libsy/tests/observability.rs:498
↓ 5 callersFunctionalgorithm
Builds a random router whose targets all share an echo client.
crates/libsy/src/algorithms/rand.rs:235
↓ 5 callersFunctionappend_note
Appends `note` to the request as conversation text. It joins the trailing user message when there is one, rather than opening a turn of its own: Anth
crates/libsy/src/algorithms/util/prompts.rs:42
↓ 5 callersFunctionassert_in_order
(haystack: &str, needles: &[&str])
crates/switchyard-server/tests/server.rs:640
↓ 5 callersFunctionattach_request_metadata
Attach request metadata and redacted headers to the Python context.
switchyard/lib/request_metadata.py:59
↓ 5 callersMethodbuild_request
(&self, state: &State, request: &Request)
crates/libsy/src/algorithms/util/llm_judge.rs:146
↓ 5 callersMethodcall
(self, ctx, request)
tests/test_infra.py:69
↓ 5 callersFunctioncollect_json_events
Drains JSON stream events and rejects unexpected text frames.
crates/switchyard-components/tests/adversarial_native_backends.rs:144
↓ 5 callersFunctionconfig
()
crates/libsy/src/algorithms/stage.rs:312
↓ 5 callersFunctionconfig_with_judge
(client: &Arc<RecordingClient>, p_solve: f64)
crates/libsy/src/algorithms/stage.rs:440
↓ 5 callersFunctioncontext_exhausted_response
Translate :class:`SwitchyardContextPoolExhaustedError` into a 400. Raised by the chain executor when every routing target has been evicted af
switchyard/lib/endpoints/upstream_error.py:219
↓ 5 callersMethoddecode
( &self, response: &AggLlmResponse, _contract: &ClassifierContract, )
crates/libsy/src/algorithms/util/llm_judge.rs:62
↓ 5 callersFunctiondecode_stream
Decodes a byte stream of `source`-format SSE frames into neutral IR chunks. Operates on raw bytes, not any HTTP client type: the caller adapts its tr
crates/switchyard-translation/src/helpers.rs:174
↓ 5 callersMethoddefault_model
(self)
tests/test_rl_logging.py:316
↓ 5 callersFunctionembed_policy
Builds the policy used by exact wire round-trip tests.
crates/switchyard-translation/tests/lossless_roundtrip.rs:244
↓ 5 callersMethodencode_stream_event
Encodes one neutral or preserved stream event for a target provider. A preserved event replays its retained JSON value unchanged when its source and
crates/switchyard-translation/src/engine.rs:271
↓ 5 callersFunctionensure_responses_created
Emits the initial Responses created event once per stream.
crates/switchyard-translation/src/codecs/responses/stream.rs:389
↓ 5 callersMethodensure_started
(&self)
crates/libsy/src/core/driver.rs:146
↓ 5 callersFunctionfind_span
(spans: &[SpanRecord], name: &str, field: &str, value: &str)
crates/libsy/tests/observability.rs:540
↓ 5 callersMethodfrom_config
Create a profile config from the validated parsing model.
switchyard/lib/profiles/stage_router.py:36
↓ 5 callersFunctionget_telemetry_headers
Return headers to attach to outbound LLM SDK clients. Returns an empty dict when telemetry is opted out, so callers can pass or merge the res
switchyard/telemetry.py:56
↓ 5 callersFunctionjson_string
Serializes JSON values into provider argument strings.
crates/switchyard-translation/src/util.rs:104
↓ 5 callersFunctionmake_anthropic_message
( *, model: str = "claude-sonnet-4-20250514", text: str = "hello" )
tests/test_chat_response.py:75
↓ 5 callersFunctionmake_completion
(*, model: str = "gpt-4o", content: str = "hello")
tests/test_chat_response.py:34
↓ 5 callersFunctionmake_responses_api_response
( *, model: str = "gpt-4o", text: str = "hello" )
tests/test_chat_response.py:107
↓ 5 callersFunctionmodel_accepts_reasoning_hint
Whether ``model`` tolerates the vLLM ``enable_thinking=False`` hint. ``False`` for Anthropic/Bedrock/Claude ids (they 400 on it), else ``True``
switchyard/lib/processors/reasoning_hint.py:13
↓ 5 callersMethodmodel_stats_mut
(&mut self, model: String)
crates/switchyard-server/src/stats/accumulator.rs:192
↓ 5 callersMethodopenclaw_2_tier
OpenClaw personal-assistant traffic; SIMPLE+MEDIUM→weak. Casual chitchat, lookups, light memory recall route to the weak tier; tool o
switchyard/lib/processors/llm_classifier/presets.py:377
↓ 5 callersMethodparse
(&self, response: &AggLlmResponse)
crates/libsy/src/algorithms/util/llm_judge.rs:168
↓ 5 callersMethodprocess
Stamp the tier for this turn and maybe escalate. Leaves the request unchanged.
switchyard/lib/processors/escalation_judge_request_processor.py:226
↓ 5 callersFunctionrequest
A one-user-turn request, the thing a note gets spliced into.
crates/libsy/src/algorithms/util/stage.rs:764
↓ 5 callersFunctionrequest_type_enum
Normalize a request-format tag to the Python enum.
switchyard_rust/core.py:640
↓ 5 callersFunctionrequest_with_metadata
(session_id: &str, correlation_id: &str)
crates/libsy/tests/observability.rs:482
↓ 5 callersMethodrun
Execute the complete Profile protocol lifecycle with a derived context.
switchyard/lib/profiles/chain.py:194
↓ 5 callersFunctionserver_error
(message: impl Into<String>)
crates/switchyard-server/src/lib.rs:979
↓ 5 callersMethodspans
(&self)
crates/libsy/tests/observability.rs:80
↓ 5 callersFunctiontext_from_blocks
Extracts text-like blocks and joins them for text-only provider fields.
crates/switchyard-translation/src/codecs/common.rs:19
↓ 5 callersMethodto_dict
Return a plain dictionary representation.
switchyard_rust/profiles.py:58
↓ 5 callersFunctiontrajectory
()
crates/switchyard-skill-distillation/src/model.rs:536
↓ 5 callersMethodtranslate
( self, ctx: ProxyContext, request: ChatRequest, response: ChatResponse, )
tests/test_switchyard.py:202
↓ 5 callersFunctionusage_from_body
Extracts usage from a buffered response body.
crates/switchyard-components/src/stats/usage.rs:35
↓ 5 callersFunctionwait_for_proxy_ready
Probe ``GET /health`` until HTTP 200 or timeout.
switchyard/cli/launchers/launcher_runtime.py:21
↓ 5 callersMethodwith_default_target
Sets the target used when no router selected a target.
crates/switchyard-components/src/backends/multi.rs:97
↓ 4 callersMethod__anext__
(self)
tests/test_sse_stream_close.py:42
↓ 4 callersFunction_breaker_affinity
(l2: _FlakyL2, clock: _Clock)
tests/test_session_affinity.py:202
↓ 4 callersFunction_build_classifier
Build the optional LLM fallback classifier for stage_router routing.
switchyard/lib/profiles/stage_router.py:102
↓ 4 callersMethod_build_footer_bytes
Render the footer as a single escape-sequence blob (no I/O). Order matters: * ``DECSC`` first — saves the child's cursor + SGR attrs
switchyard/server/shell_tui.py:154
↓ 4 callersFunction_chat_chunk
( *, content: str | None = None, finish_reason: str | None = None, )
tests/test_format_translate_processor.py:44
↓ 4 callersFunction_chunks
()
tests/test_stream_close_chain.py:80
↓ 4 callersFunction_classifier_payload
An OpenAI Chat Completion JSON body whose content is the classifier output.
tests/_chain_test_helpers.py:47
↓ 4 callersFunction_collect_events
(chunks: list)
tests/test_response_translation_engine.py:245
↓ 4 callersFunction_collect_responses_stream_events
Drain a Responses API stream and summarize events. Returns ``(event_types, text, function_calls)``: * ``event_types`` — the ``type`` field o
tests/e2e/test_passthrough_responses_e2e.py:116
↓ 4 callersFunction_collect_sdk_stream_deltas
Aggregate deltas from an OpenAI SDK ``ChatCompletionChunk`` stream. Reassembles fragmented fields across chunks using the OpenAI streaming co
tests/e2e/test_passthrough_e2e.py:87
↓ 4 callersFunction_completion_payload
An OpenAI Chat Completion JSON body (non-streaming).
tests/test_passthrough_profile_e2e.py:46
↓ 4 callersFunction_compose
(work_dir: Path, project: str, *args: str, timeout: int = 30)
tests/e2e/test_closed_book_proxy_integration.py:56
↓ 4 callersFunction_config_with_alignment
( *, enabled: bool, min_conf: float = 0.7, )
tests/test_signal_tier_selector_request_processor.py:569
↓ 4 callersMethod_drain
Drain ``master_fd`` non-blocking and write the batch to stdout. Returns ``False`` if the child closed (EIO or EOF), else ``True``. T
switchyard/server/shell_tui.py:196
↓ 4 callersFunction_last_user_text
(request: ChatRequest)
tests/test_stage_router_handoff_notes.py:36
← previousnext →301–400 of 4,886, ranked by callers