MCPcopy Create free account
hub / github.com/TanStack/ai / extendAdapter

Function extendAdapter

packages/ai/src/extend-adapter.ts:253–261  ·  view source on GitHub ↗
(
  factory: AnyAdapterFactory,
  _customModels: ReadonlyArray<ExtendedModelDef>,
)

Source from the content-addressed store, hash-verified

251// The implementation signature stays at the honest `AnyAdapterFactory` width;
252// the overload above performs the deliberate model-union widening.
253export function extendAdapter(
254 factory: AnyAdapterFactory,
255 _customModels: ReadonlyArray<ExtendedModelDef>,
256): AnyAdapterFactory {
257 // At runtime, we simply pass through to the original factory.
258 // The _customModels parameter is only used for type inference.
259 // No runtime validation - users are trusted to pass valid model names.
260 return factory
261}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected