@skydiveai/pi-extensions 0.1.252-beta.12 → 0.1.252-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +3 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4206,6 +4206,9 @@ const OPENAI_COMPLETIONS_API = "openai-completions";
|
|
|
4206
4206
|
* the OpenAI-compatible wire through the transparent proxy.
|
|
4207
4207
|
*/
|
|
4208
4208
|
const providerApiCompatExtension = (pi) => {
|
|
4209
|
+
pi.on("before_provider_headers", ({ headers }) => {
|
|
4210
|
+
headers["x-anyone-pi-stream-errors"] = "v1";
|
|
4211
|
+
});
|
|
4209
4212
|
for (const provider of OPENAI_COMPATIBLE_PROVIDERS) pi.registerProvider(provider, { models: getModels(provider).map((model) => ({
|
|
4210
4213
|
...model,
|
|
4211
4214
|
api: OPENAI_COMPLETIONS_API
|