1- import type { OpenRouterSharedSettings } from '..' ;
1+ import type { OpenRouterSharedSettings } from '..'
22
33// https://openrouter.ai/api/v1/models
4- export type OpenRouterChatModelId = string ;
4+ export type OpenRouterChatModelId = string
55
66export type OpenRouterChatSettings = {
77 /**
@@ -15,10 +15,10 @@ The exact effect will vary per model, but values between -1 and 1 should
1515decrease or increase likelihood of selection; values like -100 or 100
1616should result in a ban or exclusive selection of the relevant token.
1717
18- As an example, you can pass {"50256": -100} to prevent the <|endoftext |>
18+ As an example, you can pass {"50256": -100} to prevent the <|end-of-text |>
1919token from being generated.
2020*/
21- logitBias ?: Record < number , number > ;
21+ logitBias ?: Record < number , number >
2222
2323 /**
2424Return the log probabilities of the tokens. Including logprobs will increase
@@ -31,33 +31,33 @@ were generated.
3131Setting to a number will return the log probabilities of the top n
3232tokens that were generated.
3333*/
34- logprobs ?: boolean | number ;
34+ logprobs ?: boolean | number
3535
3636 /**
3737Whether to enable parallel function calling during tool use. Default to true.
3838 */
39- parallelToolCalls ?: boolean ;
39+ parallelToolCalls ?: boolean
4040
4141 /**
4242A unique identifier representing your end-user, which can help OpenRouter to
4343monitor and detect abuse. Learn more.
4444*/
45- user ?: string ;
45+ user ?: string
4646
4747 /**
4848 * Web search plugin configuration for enabling web search capabilities
4949 */
5050 plugins ?: Array < {
51- id : 'web' ;
51+ id : 'web'
5252 /**
5353 * Maximum number of search results to include (default: 5)
5454 */
55- max_results ?: number ;
55+ max_results ?: number
5656 /**
5757 * Custom search prompt to guide the search query
5858 */
59- search_prompt ?: string ;
60- } > ;
59+ search_prompt ?: string
60+ } >
6161
6262 /**
6363 * Built-in web search options for models that support native web search
@@ -66,12 +66,12 @@ monitor and detect abuse. Learn more.
6666 /**
6767 * Maximum number of search results to include
6868 */
69- max_results ?: number ;
69+ max_results ?: number
7070 /**
7171 * Custom search prompt to guide the search query
7272 */
73- search_prompt ?: string ;
74- } ;
73+ search_prompt ?: string
74+ }
7575
7676 /**
7777 * Provider routing preferences to control request routing behavior
@@ -80,27 +80,27 @@ monitor and detect abuse. Learn more.
8080 /**
8181 * List of provider slugs to try in order (e.g. ["anthropic", "openai"])
8282 */
83- order ?: string [ ] ;
83+ order ?: string [ ]
8484 /**
8585 * Whether to allow backup providers when primary is unavailable (default: true)
8686 */
87- allow_fallbacks ?: boolean ;
87+ allow_fallbacks ?: boolean
8888 /**
8989 * Only use providers that support all parameters in your request (default: false)
9090 */
91- require_parameters ?: boolean ;
91+ require_parameters ?: boolean
9292 /**
9393 * Control whether to use providers that may store data
9494 */
95- data_collection ?: 'allow' | 'deny' ;
95+ data_collection ?: 'allow' | 'deny'
9696 /**
9797 * List of provider slugs to allow for this request
9898 */
99- only ?: string [ ] ;
99+ only ?: string [ ]
100100 /**
101101 * List of provider slugs to skip for this request
102102 */
103- ignore ?: string [ ] ;
103+ ignore ?: string [ ]
104104 /**
105105 * List of quantization levels to filter by (e.g. ["int4", "int8"])
106106 */
@@ -114,20 +114,20 @@ monitor and detect abuse. Learn more.
114114 | 'bf16'
115115 | 'fp32'
116116 | 'unknown'
117- > ;
117+ >
118118 /**
119119 * Sort providers by price, throughput, or latency
120120 */
121- sort ?: 'price' | 'throughput' | 'latency' ;
121+ sort ?: 'price' | 'throughput' | 'latency'
122122 /**
123123 * Maximum pricing you want to pay for this request
124124 */
125125 max_price ?: {
126- prompt ?: number | string ;
127- completion ?: number | string ;
128- image ?: number | string ;
129- audio ?: number | string ;
130- request ?: number | string ;
131- } ;
132- } ;
133- } & OpenRouterSharedSettings ;
126+ prompt ?: number | string
127+ completion ?: number | string
128+ image ?: number | string
129+ audio ?: number | string
130+ request ?: number | string
131+ }
132+ }
133+ } & OpenRouterSharedSettings
0 commit comments