Function: proxyModel()
@providerprotocol/ai / proxy / proxyModel
Function: proxyModel()
Section titled “Function: proxyModel()”proxyModel(
endpoint):ModelReference<ProxyRequestOptions>
Defined in: src/providers/proxy/index.ts:65
Shorthand for creating a proxy model reference with default model ID.
Creates a proxy provider and immediately returns a model reference using ‘default’ as the model identifier. Useful for simple single-endpoint setups.
Parameters
Section titled “Parameters”endpoint
Section titled “endpoint”string
The URL to proxy requests to
Returns
Section titled “Returns”ModelReference<ProxyRequestOptions>
A model reference for use with llm()
Example
Section titled “Example”import { proxyModel } from './providers/proxy';import { llm } from './core/llm';
const model = llm({ model: proxyModel('/api/ai') });const turn = await model.generate('Hello!');