- Notifications
You must be signed in to change notification settings - Fork1k
Closed
Description
Description
ModelSettings
currently only forwardsallow-listed attributes into the HTTP request body.
TheOpenAIModel
is used by compatible providers, such asOpenRouter, which accept numerous custom parameters in the request body such asmodel-routing andprovider-routing.
As far as I can tell, the only way to inject custom parameters into the HTTP request body is to subclassOpenAIModel
and reimplement a relatively large block of code.
I'd like a way to easily define custom model settings such as by sub-classingModelSettings
or by forwarding arbitraryModelSettings
attributes on to the HTTP request, or both.
References
Issue#856 (comment) is another issue where this topic was discussed and PR#1006 proposes allowing arbitrary attributes.