@agentskit/adapters 0.13.0 → 0.13.2

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/README.md CHANGED
@@ -6,7 +6,7 @@ Connect to any LLM provider — and swap between them — without touching your
6
6
  [![npm downloads](https://img.shields.io/npm/dm/@agentskit/adapters)](https://www.npmjs.com/package/@agentskit/adapters)
7
7
  [![bundle size](https://img.shields.io/bundlejs/size/@agentskit/adapters?label=bundle)](https://bundlejs.com/?q=@agentskit/adapters)
8
8
  [![license](https://img.shields.io/badge/license-MIT-blue.svg)](../../LICENSE)
9
- [![stability](https://img.shields.io/badge/stability-stable-brightgreen)](../../docs/STABILITY.md)
9
+ [![stability](https://img.shields.io/badge/stability-beta-yellow)](../../docs/STABILITY.md)
10
10
  [![GitHub stars](https://img.shields.io/github/stars/AgentsKit-io/agentskit?style=social)](https://github.com/AgentsKit-io/agentskit)
11
11
 
12
12
  **Tags:** `ai` · `agents` · `llm` · `agentskit` · `openai` · `anthropic` · `claude` · `gemini` · `chatgpt` · `ollama` · `embeddings` · `providers`
@@ -153579,6 +153579,7 @@ function createStreamSource(doFetch, parse, errorLabel, retry) {
153579
153579
  // src/openai.ts
153580
153580
  function openai(config) {
153581
153581
  const { apiKey, model, baseUrl = "https://api.openai.com", retry } = config;
153582
+ const apiRoot = baseUrl.replace(/\/v1\/?$/, "");
153582
153583
  const isCanonicalOpenAI = (() => {
153583
153584
  try {
153584
153585
  return new URL(baseUrl).host === "api.openai.com";
@@ -153615,7 +153616,7 @@ function openai(config) {
153615
153616
  };
153616
153617
  if (includeUsage) body.stream_options = { include_usage: true };
153617
153618
  return createStreamSource(
153618
- (signal) => fetch(`${baseUrl}/v1/chat/completions`, {
153619
+ (signal) => fetch(`${apiRoot}/v1/chat/completions`, {
153619
153620
  method: "POST",
153620
153621
  headers: {
153621
153622
  "Content-Type": "application/json",