Forge documentation
Library referenceRust

forge-provider-platforms

Official direct-provider and gateway adapters for the Forge SDK

Official direct-provider and gateway adapters for the Forge SDK

Package contract

FieldValue
Languagerust
Source version0.2.0
Manifestforge-rs/crates/forge-provider-platforms/Cargo.toml
Source files1
EvidenceSource reference; registry publication and runtime conformance are separate checks

Import boundary

use forge_provider_platforms;

Use a source checkout or your verified private registry. Manifest coordinates identify the package; they do not establish that a public registry release exists.

Crate boundary

The following entries are taken from src/lib.rs. Feature conditions in the exact source still apply.

Source reference

Download package reference JSON. Each original source file and generated declaration artifact has its own SHA-256 digest. Function bodies and constant values are omitted from downloads. These are source declaration inventories, not compiler-resolved rustdoc, TypeDoc, DocC, or Dokka output. Private modules can contain public declarations that are not reachable through the package boundary; consult the entry point before importing.

lib.rs

Read declaration text · 22 declaration entries

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum ProviderFamily {
    DirectModel,
    Gateway,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum AuthStrategy {
    ApiKey,
    AccessToken,
    BrowserAccountLogin,
    CloudCredentials,
}

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ProviderPreset {
pub namespace: &'static str,
pub family: ProviderFamily,
pub auth_strategy: AuthStrategy
}

pub fn approved_direct_provider_presets() -> Vec<ProviderPreset>;

pub fn approved_gateway_provider_presets() -> Vec<ProviderPreset>;

#[cfg(not(target_arch = "wasm32"))]
pub fn register_default_core_direct_providers(registry: &mut ProviderRegistry) -> ForgeResult<()>;

#[cfg(not(target_arch = "wasm32"))]
pub fn register_openai_model(
    registry: &mut ProviderRegistry,
    model_id: impl Into<String>,
) -> ForgeResult<String>;

#[cfg(not(target_arch = "wasm32"))]
pub fn register_anthropic_model(
    registry: &mut ProviderRegistry,
    model_id: impl Into<String>,
) -> ForgeResult<String>;

#[cfg(not(target_arch = "wasm32"))]
pub fn register_google_model(
    registry: &mut ProviderRegistry,
    model_id: impl Into<String>,
) -> ForgeResult<String>;

#[cfg(not(target_arch = "wasm32"))]
pub fn register_xai_model(
    registry: &mut ProviderRegistry,
    model_id: impl Into<String>,
) -> ForgeResult<String>;

#[cfg(not(target_arch = "wasm32"))]
pub fn register_deepseek_model(
    registry: &mut ProviderRegistry,
    model_id: impl Into<String>,
) -> ForgeResult<String>;

#[cfg(not(target_arch = "wasm32"))]
pub fn register_mistral_model(
    registry: &mut ProviderRegistry,
    model_id: impl Into<String>,
) -> ForgeResult<String>;

#[cfg(not(target_arch = "wasm32"))]
pub fn register_cohere_model(
    registry: &mut ProviderRegistry,
    model_id: impl Into<String>,
) -> ForgeResult<String>;

#[cfg(not(target_arch = "wasm32"))]
pub fn register_groq_model(
    registry: &mut ProviderRegistry,
    model_id: impl Into<String>,
) -> ForgeResult<String>;

#[cfg(not(target_arch = "wasm32"))]
pub fn register_moonshot_model(
    registry: &mut ProviderRegistry,
    model_id: impl Into<String>,
) -> ForgeResult<String>;

#[cfg(not(target_arch = "wasm32"))]
pub fn register_zai_model(
    registry: &mut ProviderRegistry,
    model_id: impl Into<String>,
) -> ForgeResult<String>;

#[cfg(not(target_arch = "wasm32"))]
pub fn register_minimax_model(
    registry: &mut ProviderRegistry,
    model_id: impl Into<String>,
) -> ForgeResult<String>;

#[cfg(not(target_arch = "wasm32"))]
pub fn register_openrouter_model(
    registry: &mut ProviderRegistry,
    model_id: impl Into<String>,
) -> ForgeResult<String>;

#[cfg(not(target_arch = "wasm32"))]
pub fn register_bedrock_model(
    registry: &mut ProviderRegistry,
    model_id: impl Into<String>,
) -> ForgeResult<String>;

#[cfg(not(target_arch = "wasm32"))]
pub fn register_vertex_ai_model(
    registry: &mut ProviderRegistry,
    model_id: impl Into<String>,
) -> ForgeResult<String>;

#[cfg(not(target_arch = "wasm32"))]
pub fn register_microsoft_foundry_model(
    registry: &mut ProviderRegistry,
    model_id: impl Into<String>,
) -> ForgeResult<String>;

#[cfg(not(target_arch = "wasm32"))]
pub fn register_foundry_model(
    registry: &mut ProviderRegistry,
    model_id: impl Into<String>,
) -> ForgeResult<String>;

Continue

On this page