Your own transport
client: "custom" writes no runtime; the generated code imports yours. Everything it imports and calls is configurable — defaults are the built-in runtime, override what differs:
client: customruntime: callers: { module: "@/lib/http", get: apiGet, post: apiPost, put: apiPut, patch: apiPatch, delete: apiDelete } hooks: { module: "../hooks", query: useApiQuery, mutation: useApiMutation, toValue: toValue } types: { module: "../types", request: GeneratedRequestConfig, query: ApiQueryOptions, mutation: ApiMutationOptions, maybeGetter: MaybeGetter } list: { name: ApiListData, module: "@/types", count: count, items: list } # or false envelope: { name: ApiEnvelope, module: "../../types/api", result: result, data: data, keys: [result, code, message, data] } # or false requestKeys: { query: params, pathParams: addTemplateToUrl, formData: isFormData, baseUrl: baseUrl, signal: signal, headers: headers, envelope: isEnvelope, body: body, responseType: responseType } services: { module: "@/config/api", fn: serviceBaseUrl } # or { baseUrls: { users: "https://…" } }Module paths are written as-is into the generated files, so paths relative to the output folder must be relative to it. library still decides how the generated hooks are named (use…, create…, inject…) and whether they read their arguments through toValue / MaybeGetter (the reactive libraries) — a custom runtime has to export those two names then, and its wrappers are named <prefix>ApiQuery by default.
The transport contract is apiGet<T>(route, config), apiPost<T>(route, body, config) (also put / patch), apiDelete<T>(route, config), where config carries signal, params (query), addTemplateToUrl ({pet_id: "1"} for /pets/{pet_id}), isFormData and baseUrl. Each resolves to the payload — whatever your transport makes of the answer.
headers (declared header parameters, and the Content-Type of a body that is not JSON), body (the key a DELETE’s body rides in), responseType ("text" or "blob" for a non-JSON answer) and isEnvelope are written only when the config names the key (requestKeys.headers, .body, .responseType, .envelope). Until then a header parameter is reported instead of being sent and a DELETE with a body is skipped with a warning. The built-in clients never use isEnvelope.
openapi-forge doctor checks that the modules the config names can be found.