MCPcopy Create free account

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

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

↓ 15 callersFunctionobject
Reads a JSON object or returns a typed translation error at the given path.
crates/switchyard-translation/src/util.rs:24
↓ 15 callersMethodpin
Pin ``request``'s conversation to ``value`` (no-op when disabled). Writes through to the L2 when configured; an L2 error is swallowed so
switchyard/lib/session_affinity.py:225
↓ 15 callersMethodregistered_models
(self)
tests/test_rl_logging.py:313
↓ 15 callersFunctionrequest
(metadata: Metadata)
crates/libsy/src/algorithms/util/affinity.rs:235
↓ 15 callersMethodrequest_to_any_of
Passthrough when possible, otherwise translate to the first supported type.
switchyard_rust/translation.py:129
↓ 15 callersMethodresponse_for_request
Translate a backend response to the original client's wire format.
switchyard_rust/translation.py:165
↓ 15 callersMethodresponse_to
Return a ChatResponse wrapper in the target wire format.
switchyard_rust/translation.py:143
↓ 15 callersMethodsend
(&self, request: OpenAiHttpRequest)
crates/switchyard-components/src/backends/openai.rs:375
↓ 15 callersFunctiontest_app
(routes: &[(&str, &[&str])])
crates/switchyard-server/tests/server.rs:234
↓ 14 callersFunction_target
( target_id: str, model: str, *, format: object = BackendFormat.OPENAI, api_key: str | Non
tests/test_random_routing_llm_backend.py:37
↓ 14 callersMethodcall
Send one normalized, buffered text request through LiteLLM.
examples/experimental/litellm/src/switchyard_litellm/client.py:325
↓ 14 callersFunctionfake_anthropic_stream
( events: list[RawContentBlockDeltaEvent], )
tests/test_chat_response.py:97
↓ 14 callersMethodopenai_responses_completion
Build a buffered OpenAI Responses response.
switchyard_rust/core.py:200
↓ 14 callersFunctionpick_capable_first
CAPABLE default. EFFICIENT only when the scorer is confidently negative.
switchyard/lib/processors/stage_router/picker.py:34
↓ 14 callersMethodpinned
Return the value pinned to ``request``'s conversation, or ``None``. Checks L1 first; on a miss (and only when an L2 is configured) consults
switchyard/lib/session_affinity.py:199
↓ 14 callersFunctionrecord_backend_selection
Stamps a served model into context the same way native backends do.
crates/switchyard-components/tests/stats_processors.rs:27
↓ 14 callersFunctionrequest
Builds an OpenAI Chat request fixture.
crates/switchyard-components/tests/adversarial_multi_llm_backend.rs:184
↓ 14 callersFunctiontext_response
Builds a single-turn response: one assistant message carrying `completion`, for `model`. Construct [`AggLlmResponse`] directly when usage, tools, rea
crates/protocol/src/lib.rs:51
↓ 14 callersMethodwith_processor
Appends a processor to the head-of-request chain.
crates/libsy/src/algorithms/fall_through.rs:185
↓ 13 callersMethodanthropic_stream
Build a streaming Anthropic response.
switchyard_rust/core.py:215
↓ 13 callersMethodfinish_stream
Finishes target-provider stream emission after the source stream closes.
crates/switchyard-translation/src/engine.rs:289
↓ 13 callersFunctionfixed
(scores: Vec<Score>)
crates/libsy/src/algorithms/fall_through.rs:675
↓ 13 callersMethodkeys
(&self)
crates/switchyard-server/src/observability.rs:70
↓ 13 callersFunctionmeter
The `libsy`-scoped meter from the globally installed provider.
crates/libsy/src/observability.rs:74
↓ 13 callersMethodrecord_success
Records a successful backend call.
crates/switchyard-components/src/stats/accumulator.rs:40
↓ 13 callersMethodrecord_usage
Records token usage and end-to-end latency for a completed response.
crates/switchyard-components/src/stats/accumulator.rs:98
↓ 13 callersFunctionrequest_body
()
examples/experimental/litellm/tests/test_client.py:16
↓ 13 callersMethodstream_for_request
Translate a backend stream to the original client's stream contract.
switchyard_rust/translation.py:184
↓ 12 callersFunction_async_chunks
(*chunks: Any)
tests/test_translation_engine_chaos.py:193
↓ 12 callersMethod_bundle
(self)
tests/test_route_bundle.py:929
↓ 12 callersFunction_openai_config
( *, strong_model: str = "strong-m", weak_model: str = "weak-m", strong_probability: float = 0
tests/test_random_routing_profile.py:107
↓ 12 callersFunction_processor
( response: str | Exception, *, affinity: SessionAffinity | None = None, session_key_depth: in
tests/test_escalation_judge_request_processor.py:70
↓ 12 callersFunction_run_collector
Run DimensionCollector.process() and return the populated context.
tests/test_tool_result_signal_collector.py:17
↓ 12 callersFunction_signals_json
(**overrides: Any)
tests/test_llm_classifier_request_processor.py:86
↓ 12 callersFunction_write_task
(root: Path, name: str, task_toml: str, dockerfile: str | None = None)
tests/test_prepare_harbor_dataset.py:26
↓ 12 callersFunctionbuild_switchyard_router
Builds an Axum router for the supported LLM wire formats.
crates/switchyard-server/src/lib.rs:446
↓ 12 callersMethodclassify
Return ``"capable"``, ``"efficient"``, or ``None`` (fall-open).
switchyard/lib/processors/stage_router/classifier.py:188
↓ 12 callersMethodcodec
Looks up a codec by format identifier.
crates/switchyard-translation/src/engine.rs:73
↓ 12 callersFunctionfake_responses_stream
( events: list[ResponseTextDeltaEvent], )
tests/test_chat_response.py:144
↓ 12 callersMethodparse_args
Parses command-line arguments using clap.
crates/switchyard-server/src/cli.rs:66
↓ 12 callersFunctionrequest_type_value
Normalize request-format tags and wire strings.
switchyard_rust/core.py:628
↓ 12 callersFunctionretain
Folds a request and its decision through the router, retaining `model`.
crates/libsy/src/algorithms/util/affinity.rs:286
↓ 12 callersFunctiontest_error
(message: &'static str)
crates/libsy/src/core/driver.rs:270
↓ 12 callersFunctionvalue_to_python
Converts a JSON value into a Python object.
crates/switchyard-py/src/py_serde.rs:33
↓ 11 callersMethod_bundle
(self)
tests/test_route_bundle.py:644
↓ 11 callersFunction_ctx
(messages: list[dict])
tests/test_stage_router_pickers.py:30
↓ 11 callersFunction_option_values
(argv: list[str], option: str)
tests/test_run_baseline_script.py:205
↓ 11 callersFunction_random_routing_switchyard
Build the profile-backed runtime used by these tests.
tests/test_random_routing_profile.py:137
↓ 11 callersFunction_request
A turn-1 request whose first user message anchors a distinct session.
tests/test_session_affinity.py:19
↓ 11 callersFunction_signals
( *, recommended_tier: RouteTier = RouteTier.COMPLEX, confidence: float = 0.9, abstain: bool =
tests/test_signal_tier_selector_request_processor.py:89
↓ 11 callersFunctionanthropic_target
Builds an Anthropic target fixture.
crates/switchyard-components/tests/adversarial_native_backends.rs:107
↓ 11 callersFunctionbuild_native_backend
Build the native Rust backend for one resolved or auto ``LlmTarget``.
switchyard/lib/backends/multi_llm_backend.py:46
↓ 11 callersMethodget_mut
Gets a mutable typed extension by Rust type.
crates/switchyard-components/src/contracts/context.rs:81
↓ 11 callersFunctionprobe_anthropic_messages_support
Return True iff ``{base_url}/v1/messages`` is a functional route. Sends a model-scoped probe POST with real auth. Response interpretation: *
switchyard/lib/backends/backend_format_resolver.py:390
↓ 11 callersFunctionpush_lossy
Applies the lossy-conversion policy and records diagnostics when configured.
crates/switchyard-translation/src/util.rs:83
↓ 11 callersMethodrun
( self, request: Mapping[str, object], headers: Mapping[str, str] | None =
switchyard_rust/libsy.py:79
↓ 11 callersFunctionsession
(session_id: &str, agent_id: &str)
crates/libsy/src/algorithms/util/affinity.rs:267
↓ 11 callersMethodsnapshot_sync
Return the latest statistics snapshot.
switchyard/cli/launchers/stats_source.py:15
↓ 11 callersFunctionvalue_from_python
Converts an arbitrary Python object into a JSON value.
crates/switchyard-py/src/py_serde.rs:28
↓ 11 callersMethodvalues
Return the retained values in least-to-most-recent order.
switchyard/lib/session_cache.py:46
↓ 10 callersFunction_aiter
(items: list[Any])
tests/test_format_translate_processor.py:39
↓ 10 callersFunction_build_signal
()
tests/test_stage_router_classifier.py:52
↓ 10 callersMethod_bundle
(self)
tests/test_route_bundle.py:459
↓ 10 callersFunction_collect
(stream: AsyncIterator[Any])
tests/test_format_translate_processor.py:234
↓ 10 callersFunction_format_summary
Return a formatted summary string, or empty string if no requests were made.
switchyard/cli/launchers/session_summary.py:32
↓ 10 callersFunction_load_manifest_module
()
tests/test_run_manifest.py:15
↓ 10 callersFunction_make_chain
(name: str = "chain")
tests/test_route_table.py:26
↓ 10 callersFunction_patch_httpx
Return a context manager patching AsyncClient.post. If ``response`` is an Exception, it's raised from the POST; otherwise it's returned.
tests/test_anthropic_probe.py:31
↓ 10 callersFunction_repository
( tmp_path: Path, page_relative_path: str = "docs/guides/page.md" )
tests/test_mkdocs_repository_links.py:27
↓ 10 callersMethodargmax
The top-scoring [`Score`], or `None` when the classifier abstained (an empty set). An [`Ambiguous`](Self::Ambiguous) classification also yields `None
crates/libsy/src/core/classifier.rs:34
↓ 10 callersMethodas_agg
Borrow the aggregate; `None` while this is still a stream.
crates/protocol/src/stream.rs:130
↓ 10 callersMethodbase_url
Returns the base URL for this server.
crates/switchyard-components/tests/support/mod.rs:74
↓ 10 callersFunctionclassify_request
()
crates/libsy/src/algorithms/llm_class.rs:1104
↓ 10 callersFunctionencode_stream
Encodes a stream of IR chunks into a stream of target-format wire events. `served_model` is exposed as the response model (via the stream state's `ta
crates/switchyard-translation/src/helpers.rs:84
↓ 10 callersFunctionmake_chunk
(*, index: int = 0, content: str = "hi")
tests/test_chat_response.py:51
↓ 10 callersMethodmap
Transform each event in registration order.
switchyard_rust/core.py:140
↓ 10 callersFunctionmodel_stats
(snapshot: &'a StatsSnapshot, model: &str)
crates/switchyard-components/tests/stats_accumulator.rs:784
↓ 10 callersMethodrender
(self, cols: int)
switchyard/cli/launchers/live_stats_footer.py:53
↓ 10 callersFunctionresolve_llm_target
Resolve ``BackendFormat.AUTO`` into the concrete native backend format.
switchyard/lib/backends/multi_llm_backend.py:31
↓ 10 callersFunctionrun
Drives a fresh router through one turn.
crates/libsy/src/algorithms/fall_through.rs:721
↓ 10 callersFunctionserver_state_from_toml
(toml: &str)
crates/switchyard-server/src/config.rs:43
↓ 10 callersFunctiontarget_set
A target set whose targets all serve via [`EchoClient`].
crates/libsy/src/algorithms/fall_through.rs:579
↓ 10 callersMethodtext_content
Concatenates text-like content blocks when the message has any.
crates/protocol/src/llm.rs:57
↓ 10 callersFunctionupstream_response_from_ctx
Return a structured upstream-status response when one can be recovered. Python backends store status/body in ``ctx.metadata``. Rust backends atta
switchyard/lib/endpoints/upstream_error.py:90
↓ 9 callersFunction_load_traces
Load all trace JSON files from the output directory, sorted by timestamp.
tests/test_codex_multiturn_traces.py:38
↓ 9 callersFunction_make_tui
( footer_lines: list[tuple[str, int]] | None = None, footer_height: int = 1, )
tests/test_shell_tui.py:44
↓ 9 callersFunction_mapping
(value: object, path: str)
examples/experimental/litellm/src/switchyard_litellm/client.py:23
↓ 9 callersFunction_option_value
(argv: list[str], option: str)
tests/test_run_baseline_script.py:201
↓ 9 callersFunction_prepare
( tmp_path: Path, source: Path, *, source_dataset: str = "openthoughts-tblite@2.0", )
tests/test_prepare_harbor_dataset.py:36
↓ 9 callersFunction_rewrite
(markdown: str, repo_root: Path, docs_dir: Path, page_path: Path)
tests/test_mkdocs_repository_links.py:41
↓ 9 callersFunction_snapshot
( total_requests: int = 0, total_errors: int = 0, prompt: int = 0, completion: int = 0, ca
tests/test_session_summary.py:9
↓ 9 callersMethodaclose
(self)
tests/test_sse_stream_close.py:149
↓ 9 callersFunctionbuild_profile
Build ``config`` and verify the result implements the profile runtime.
switchyard/lib/profiles/table.py:122
↓ 9 callersMethodcache_creation_input_tokens
Returns the cache-creation input-token count.
crates/protocol/src/llm.rs:381
↓ 9 callersMethodcached_input_tokens
Returns the cache-read input-token count.
crates/protocol/src/llm.rs:374
↓ 9 callersMethodclose
(self)
tests/test_launchers.py:69
↓ 9 callersMethodinto_response
(self, wire_format: WireFormat)
crates/switchyard-server/src/lib.rs:929
↓ 9 callersMethodmaybe_inject
Inject the guidance note appropriate to the picked tier. Capable tier: the escalation note, gated to real wrong signals when ``only_o
switchyard/lib/processors/stage_router/handoff_notes.py:81
↓ 9 callersMethodopenai_responses_stream
Build a streaming OpenAI Responses response.
switchyard_rust/core.py:205
↓ 9 callersFunctionopenai_target
Builds an OpenAI target fixture.
crates/switchyard-components/tests/adversarial_native_backends.rs:87
← previousnext →101–200 of 4,886, ranked by callers