1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! Concrete inference provider adapters (issue #2403, epic #2400 Wave 1).
//!
//! Why: the #2402 foundation shipped the [`InferenceAdapter`] trait, the
//! capability registry, and the [`crate::inference::Configurator`] seam but left
//! the construction step to a test-only [`crate::inference::test_support::ScriptedAdapter`].
//! This module realises the seam: a shared OpenAI-compatible HTTP core plus one
//! thin config per OpenAI-dialect provider, and the [`register_default_factories`]
//! entry point that wires them into the configurator so
//! `provider_for("openrouter" | "fireworks" | "openai", &store)` builds a REAL
//! `Box<dyn InferenceAdapter>`.
//! What: [`openai_compat::OpenAiCompatAdapter`] (the core) and the
//! [`openrouter`]/[`fireworks`]/[`openai`]/[`together`] provider configs, plus
//! [`register_default_factories`]. Anthropic-dialect providers (Bedrock #2407,
//! Anthropic-direct #2408) are out of scope here.
//! Test: each submodule's inline `tests` + the offline mock-server round-trip in
//! `crates/trusty-common/tests/inference_adapters.rs`.
pub use ;
use crateConfigurator;
use crateProviderId;
/// Register the built-in OpenAI-dialect provider factories into `cfg`.
///
/// Why: consumers want one call that makes the configurator able to build every
/// adapter this ticket ships, rather than remembering each `register` line. The
/// configurator stays empty by default (no implicit adapters) — this is the
/// explicit opt-in that turns resolution into live adapters.
/// What: registers the OpenRouter, Fireworks, OpenAI, and Together (#2488)
/// production factories (each pointed at its real base URL) under their
/// [`ProviderId`]. Bedrock and Anthropic-direct are intentionally NOT registered
/// here (later waves).
/// Test: `crates/trusty-common/tests/inference_adapters.rs::default_factories_register_openai_dialect`.