MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / bundle_with_only_system_route

Function bundle_with_only_system_route

crates/openshell-server/src/inference.rs:1738–1753  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1736
1737 #[tokio::test]
1738 async fn bundle_with_only_system_route() {
1739 let store = test_store().await;
1740
1741 let provider = make_provider("openai-dev", "openai", "OPENAI_API_KEY", "sk-test");
1742 store.put_message(&provider).await.expect("persist");
1743 let system_route = make_route(SANDBOX_SYSTEM_ROUTE_NAME, "openai-dev", "gpt-4o-mini");
1744 store.put_message(&system_route).await.expect("persist");
1745
1746 let resp = resolve_inference_bundle(&store)
1747 .await
1748 .expect("bundle should resolve");
1749
1750 assert_eq!(resp.routes.len(), 1);
1751 assert_eq!(resp.routes[0].name, SANDBOX_SYSTEM_ROUTE_NAME);
1752 assert_eq!(resp.routes[0].model_id, "gpt-4o-mini");
1753 }
1754
1755 #[tokio::test]
1756 async fn get_returns_system_route_when_requested() {

Callers

nothing calls this directly

Calls 5

resolve_inference_bundleFunction · 0.85
put_messageMethod · 0.80
test_storeFunction · 0.70
make_providerFunction · 0.70
make_routeFunction · 0.70

Tested by

no test coverage detected