Skip to content

Inconsistent documented sample code on defaultHeaders when creating OpenRouter client and actual code #82

@dkstar88

Description

@dkstar88

Not a huge issue, on your documentation you clearly writes defaultHeaders is allowed when creating openrouter sdk client. But looking at node_modules@openrouter\sdk\esm\lib\config.d.ts

Image
export type SDKOptions = {
    apiKey?: string | (() => Promise<string>) | undefined;
    httpClient?: HTTPClient;
    /**
     * Allows overriding the default server used by the SDK
     */
    server?: keyof typeof ServerList | undefined;
    /**
     * Allows overriding the default server URL used by the SDK
     */
    serverURL?: string | undefined;
    /**
     * Allows overriding the default user agent used by the SDK
     */
    userAgent?: string | undefined;
    /**
     * Allows overriding the default retry config used by the SDK
     */
    retryConfig?: RetryConfig;
    timeoutMs?: number;
    debugLogger?: Logger;
};

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions