MCPcopy Create free account
hub / github.com/openai/openai-node / prepareOptions

Method prepareOptions

src/client.ts:693–700  ·  view source on GitHub ↗

* Used as a callback for mutating the given `FinalRequestOptions` object.

(options: FinalRequestOptions)

Source from the content-addressed store, hash-verified

691 * Used as a callback for mutating the given `FinalRequestOptions` object.
692 */
693 protected async prepareOptions(options: FinalRequestOptions): Promise<void> {
694 if (this._provider) return;
695
696 const security = options.__security ?? { bearerAuth: true };
697 if (security.bearerAuth) {
698 await this._callApiKey();
699 }
700 }
701
702 /**
703 * Used as a callback for mutating the given `RequestInit` object.

Callers 1

makeRequestMethod · 0.95

Calls 1

_callApiKeyMethod · 0.95

Tested by

no test coverage detected