Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NVIDIA-NeMo/Switchyard
/ functions
Functions
4,886 in github.com/NVIDIA-NeMo/Switchyard
⨍
Functions
4,886
◇
Types & classes
851
↳
Endpoints
27
↓ 242 callers
Method
map
(slf: PyRef<'_, Self>, callback: &Bound<'_, PyAny>)
crates/switchyard-py/src/interop/response.rs:230
↓ 149 callers
Method
iter
Iterate the evicted target ids in arbitrary order.
crates/switchyard-components/src/contracts/context.rs:213
↓ 137 callers
Method
append
( &mut self, context: RoutingLogContext, model: &str, tier: Option<&str>,
crates/switchyard-server/src/routing_log.rs:44
↓ 110 callers
Method
get
Gets an immutable typed extension by Rust type.
crates/switchyard-components/src/contracts/context.rs:73
↓ 101 callers
Method
get
(self, key: str)
tests/test_session_affinity.py:34
↓ 101 callers
Method
insert
Inserts a typed extension, returning the previous value of the same type.
crates/switchyard-components/src/contracts/context.rs:65
↓ 85 callers
Method
is_empty
Returns whether the extension map is empty.
crates/switchyard-components/src/contracts/context.rs:176
↓ 84 callers
Method
push
Appends one observation.
crates/switchyard-components/tests/adversarial_multi_llm_backend.rs:48
↓ 82 callers
Method
request_to
Return *request* in the target wire format.
switchyard_rust/translation.py:114
↓ 80 callers
Method
anthropic
Build an Anthropic Messages request.
switchyard_rust/core.py:79
↓ 79 callers
Method
get
Return the builder method for *preset_id*. Raises: ValueError: If *preset_id* is not in :attr:`PRESETS`. The err
switchyard/lib/profiles/random_routing_presets.py:130
↓ 69 callers
Method
lock
Locks the context unless an async Rust component currently owns it.
crates/switchyard-py/src/interop/context.rs:29
↓ 65 callers
Method
openai_chat
Build an OpenAI Chat Completions request.
switchyard_rust/core.py:69
↓ 60 callers
Method
get
Return a cached value and mark it as most recently used.
switchyard/lib/session_cache.py:29
↓ 59 callers
Function
build_route_bundle_table
Parse *raw* dict and build a :class:`RouteTable`. Thin entrypoint that the YAML loader and any other dict-driven caller uses. Parses + env-ex
switchyard/cli/route_bundle.py:360
↓ 54 callers
Method
openai_completion
Build a buffered OpenAI Chat Completions response.
switchyard_rust/core.py:190
↓ 51 callers
Method
json
Creates a one-shot server returning JSON.
crates/switchyard-components/tests/support/mod.rs:63
↓ 48 callers
Method
items
Iterate ``(model_id, chain, metadata)`` triples in registration order. Used when a caller needs to merge one table into another — e.g. a
switchyard/lib/route_table.py:103
↓ 46 callers
Method
run
Process a request to completion, returning the final [`Response`] and the trace of [`Decision`]s the algorithm made along the way.
crates/libsy/src/core/algorithm.rs:710
↓ 45 callers
Method
translate_request
Translates a request body from source format to target format.
crates/switchyard-translation/src/engine.rs:148
↓ 43 callers
Method
resolve
Return the concrete backend format for ``tier``. Explicit formats are already resolved. ``AUTO`` needs a real endpoint probe, so miss
switchyard/lib/backends/backend_format_resolver.py:53
↓ 42 callers
Method
as_str
Returns the stable lowercase tier label.
crates/switchyard-components/src/request_processors/random_routing.rs:26
↓ 41 callers
Method
iter_components
(self)
tests/test_subagent_routing.py:33
↓ 40 callers
Method
openai_responses
Build an OpenAI Responses request.
switchyard_rust/core.py:74
↓ 40 callers
Method
process
(self, ctx, request)
tests/test_infra.py:51
↓ 37 callers
Method
info
Push a fire-and-forget [`DriverStep::Info`] payload; there is no promise to await for a response. Awaits channel capacity (the consumer pacing the str
crates/libsy/src/core/driver.rs:195
↓ 37 callers
Method
len
Returns the number of stored extension values.
crates/switchyard-components/src/contracts/context.rs:171
↓ 36 callers
Method
openai_stream
Build a streaming OpenAI Chat Completions response.
switchyard_rust/core.py:195
↓ 36 callers
Method
snapshot
Returns a computed snapshot suitable for JSON serialization.
crates/switchyard-components/src/stats/accumulator.rs:306
↓ 33 callers
Function
openai_chat
(body: Value)
crates/switchyard-components/src/dimension_collector/response/checks.rs:225
↓ 33 callers
Method
push
Apply one chunk. Later `MessageStart`/`Usage`/`MessageStop` fields overwrite earlier ones; text, reasoning, and tool-call arguments append.
crates/protocol/src/stream.rs:346
↓ 30 callers
Method
get
The prompt configured for `target`, if any.
crates/libsy/src/algorithms/util/prompts.rs:88
↓ 29 callers
Function
response_type_matches
Return whether a Rust-backed response has the requested wire shape.
switchyard_rust/core.py:691
↓ 29 callers
Function
target_backend
Builds a target/backend pair for `MultiLlmBackend`.
crates/switchyard-components/tests/adversarial_multi_llm_backend.rs:175
↓ 28 callers
Function
build_switchyard_app
Create a FastAPI app serving *switchyard* over all inbound formats. Registers three LLM endpoints plus a liveness probe: - ``POST /v1/chat/c
switchyard/server/switchyard_app.py:67
↓ 28 callers
Method
model_dump
(self, **kwargs: object)
tests/test_switchyard_rust_core_bindings.py:157
↓ 28 callers
Method
with_classifier
Appends a classifier to the cascade.
crates/libsy/src/algorithms/fall_through.rs:191
↓ 27 callers
Method
call
(&self, ctx: &mut ProxyContext, request: &ChatRequest)
crates/switchyard-components/tests/stats_processors.rs:94
↓ 27 callers
Method
contains
Returns whether a value of type `T` is present.
crates/switchyard-components/src/contracts/context.rs:163
↓ 27 callers
Function
request_type_matches
Return whether a request has the requested wire format.
switchyard_rust/core.py:645
↓ 26 callers
Method
lock
(&self)
crates/switchyard-server/src/stats/accumulator.rs:169
↓ 25 callers
Function
_responses_request_to_chat
(body: object)
tests/test_responses_openai_translation.py:15
↓ 25 callers
Method
build
(self)
tests/test_python_profile_abstractions.py:408
↓ 25 callers
Function
send
(app: &Router, method: &str, path: &str, body: Option<Value>)
crates/switchyard-server/tests/server.rs:570
↓ 24 callers
Function
_run_baseline
( tmp_path: Path, *args: str, env: dict[str, str] | None = None, include_dataset: bool = True,
tests/test_run_baseline_script.py:148
↓ 23 callers
Method
build
(&self)
crates/switchyard-server/src/config.rs:60
↓ 23 callers
Method
from_config
Builds a contract from user settings and packaged defaults. The response format must contain `json_schema.schema` and is retained separately for the
crates/libsy/src/algorithms/util/classifier_contract.rs:47
↓ 22 callers
Function
_config
( *, profile_name: str = "coding_agent", enable_stats: bool = True, classifier_min_confidence:
tests/test_deterministic_routing_profile.py:52
↓ 22 callers
Function
_request
(content: str = "hello", *, prior_assistant_turns: int = 0)
tests/test_signal_tier_selector_request_processor.py:65
↓ 22 callers
Method
process
(self, ctx: ProxyContext, request: ChatRequest)
switchyard/lib/processors/llm_classifier/tier_selector_request_processor.py:202
↓ 22 callers
Method
register
Register *switchyard* as the exact-match chain for *model*.
switchyard/lib/route_table.py:73
↓ 21 callers
Method
call
(&self, ctx: &mut ProxyContext, request: &ChatRequest)
crates/switchyard-components/tests/adversarial_multi_llm_backend.rs:132
↓ 21 callers
Method
captured
Waits for and returns the captured request.
crates/switchyard-components/tests/support/mod.rs:79
↓ 21 callers
Method
record_success
Records one successful routed backend call.
crates/switchyard-server/src/stats/accumulator.rs:36
↓ 21 callers
Method
snapshot
Returns a serializable point-in-time snapshot.
crates/switchyard-server/src/stats/accumulator.rs:159
↓ 21 callers
Method
warning
Creates a warning diagnostic.
crates/switchyard-translation/src/diagnostic.rs:31
↓ 20 callers
Method
call_rewrite_model
Calls the backend for `model_name` (or the request's own model), over the wire format the request pins in its metadata (else the model's default backe
crates/libsy-llm-client/src/client.rs:363
↓ 19 callers
Method
is_empty
Whether any target has a prompt, so a caller can skip wiring the processor when none does.
crates/libsy/src/algorithms/util/prompts.rs:94
↓ 19 callers
Method
lookup_switchyard
Return the chain for *model*. Records *model* as the last successfully resolved id (see :attr:`last_looked_up`). Raises:
switchyard/lib/route_table.py:113
↓ 19 callers
Function
request_for
(model: Option<&str>, stream: bool)
crates/libsy-llm-client/src/client.rs:925
↓ 19 callers
Method
values
Returns a cloned copy of all observations.
crates/switchyard-components/tests/adversarial_multi_llm_backend.rs:54
↓ 18 callers
Method
_make_chain
(self, **overrides)
tests/test_switchyard.py:298
↓ 18 callers
Function
anthropic
(body: Value)
crates/switchyard-components/src/dimension_collector/response/checks.rs:229
↓ 18 callers
Method
body
Returns the wrapped JSON request body.
crates/switchyard-components/src/contracts/types.rs:39
↓ 18 callers
Method
call
(self, ctx: ProxyContext, request: ChatRequest)
tests/test_switchyard.py:191
↓ 18 callers
Method
get
(&self, key: &str)
crates/switchyard-server/src/observability.rs:66
↓ 18 callers
Method
process
(self, ctx: ProxyContext, request: ChatRequest)
switchyard/lib/processors/llm_classifier/request_processor.py:342
↓ 18 callers
Method
record
Remembers that `target` overflowed for `identity`, tracking at most [`MAX_EVICTION_IDENTITIES`] identities.
crates/libsy/src/core/algorithm.rs:485
↓ 18 callers
Method
record_usage
Records usage and terminal latency after a successful routed call.
crates/switchyard-server/src/stats/accumulator.rs:84
↓ 18 callers
Method
remove
Removes a typed extension and returns it when present.
crates/switchyard-components/src/contracts/context.rs:89
↓ 18 callers
Method
tap
(_event)
tests/test_switchyard.py:129
↓ 18 callers
Function
text_request
Builds a single-turn request: one user message carrying `prompt`, for `model`. This deliberately creates only the common text shape. Construct [`LlmR
crates/protocol/src/lib.rs:25
↓ 18 callers
Method
translate_event
Translates one streaming source event into zero or more target events.
crates/switchyard-translation/src/engine.rs:229
↓ 18 callers
Method
translate_response
Translates a response body from source format to target format.
crates/switchyard-translation/src/engine.rs:205
↓ 17 callers
Function
_deterministic_routing_switchyard
Build the profile-backed runtime used by these tests.
tests/test_deterministic_routing_profile.py:98
↓ 17 callers
Method
aclose
Retain asynchronous lifecycle compatibility without owning a transport.
examples/experimental/litellm/src/switchyard_litellm/client.py:343
↓ 17 callers
Method
anthropic_completion
Build a buffered Anthropic response.
switchyard_rust/core.py:210
↓ 17 callers
Function
make_request
(*, model: str = "gpt-4o")
tests/test_switchyard.py:52
↓ 17 callers
Method
process
Records request-start metadata and returns the request unchanged.
crates/switchyard-components/src/request_processors/stats.rs:27
↓ 17 callers
Method
run
(self, input: ProfileInput)
tests/test_python_profile_abstractions.py:59
↓ 17 callers
Function
with_messages
(messages: Vec<Message>)
crates/libsy/src/algorithms/util/tool_signals.rs:608
↓ 17 callers
Method
with_runtime_components
Return a copy with serving-level stats and processor hooks applied. Profile configs stay user-facing and parseable; shared serving resources
switchyard/lib/profiles/chain.py:106
↓ 16 callers
Function
_line_argv
(stdout: str, prefix: str)
tests/test_run_baseline_script.py:196
↓ 16 callers
Function
_write_server_config
(path: Path)
tests/test_run_baseline_script.py:209
↓ 16 callers
Function
fake_stream
(chunks: list[ChatCompletionChunk])
tests/test_chat_response.py:67
↓ 16 callers
Method
into_agg
Reduce to the buffered aggregate: return an `Agg` unchanged, or drive a `Stream` to completion, folding its normalized chunks into an [`AggLlmResponse
crates/protocol/src/stream.rs:142
↓ 16 callers
Method
lock
(&self)
crates/switchyard-components/src/stats/accumulator.rs:318
↓ 16 callers
Function
request
()
crates/libsy/src/core/algorithm.rs:981
↓ 16 callers
Method
stream
Take the single consumer stream of [`DriverStep`]s. Callable once: a second call yields a one-item stream carrying an `Err`, since the receiver is gon
crates/libsy/src/core/driver.rs:241
↓ 16 callers
Function
target
Builds a target with explicit endpoint credentials for native backend tests.
crates/switchyard-components/tests/adversarial_native_backends.rs:67
↓ 15 callers
Function
_config
(**overrides: Any)
tests/test_escalation_router_profile.py:43
↓ 15 callers
Function
_load_native
()
switchyard_rust/core.py:374
↓ 15 callers
Function
_request
(**body_overrides: Any)
tests/test_llm_classifier_request_processor.py:77
↓ 15 callers
Function
_request
Chat request with enough prior assistant turns to pass the judge gate.
tests/test_escalation_judge_request_processor.py:56
↓ 15 callers
Function
_verdict_json
(escalate: bool, reason: str = "same error repeating")
tests/test_escalation_judge_request_processor.py:52
↓ 15 callers
Method
as_str
Stable lowercase label used in stats.
crates/libsy/src/algorithms/util/stage.rs:164
↓ 15 callers
Method
bind
Binds the configured address and prepares the HTTP router.
crates/switchyard-server/src/lib.rs:288
↓ 15 callers
Function
chat_map
A one-model config list: "gpt" served over OpenAI Chat at base_url.
crates/libsy-llm-client/src/client.rs:837
↓ 15 callers
Function
get_tool_result_signal
(ctx: &Bound<'_, PyAny>)
crates/switchyard-py/src/component_bindings/dimension_collector.rs:384
↓ 15 callers
Function
model_stats
Fetches one model stats block with an explicit test error on absence.
crates/switchyard-components/tests/stats_processors.rs:830
next →
1–100 of 4,886, ranked by callers