MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / new

Method new

crates/opencode-provider/src/bootstrap.rs:2357–2374  ·  view source on GitHub ↗
(
        id: String,
        name: String,
        inner: Arc<dyn RuntimeProvider>,
        models: Vec<RuntimeModelInfo>,
    )

Source from the content-addressed store, hash-verified

2355
2356impl AliasedProvider {
2357 fn new(
2358 id: String,
2359 name: String,
2360 inner: Arc<dyn RuntimeProvider>,
2361 models: Vec<RuntimeModelInfo>,
2362 ) -> Self {
2363 let model_index = models
2364 .iter()
2365 .map(|model| (model.id.clone(), model.clone()))
2366 .collect();
2367 Self {
2368 id,
2369 name,
2370 inner,
2371 models,
2372 model_index,
2373 }
2374 }
2375}
2376
2377#[async_trait]

Callers

nothing calls this directly

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected