# @friendliai/ai-provider

## 1.1.15

### Patch Changes

- b1d75a9: Deprecate DeepSeek-V3.1

## 1.1.14

### Patch Changes

- 68f6baf: Add gemma-4-31B-it to FSE model list

## 1.1.13

### Patch Changes

- f558309: Deprecate Qwen3-30B-A3B

## 1.1.12

### Patch Changes

- ec80707: Deprecate GLM-4.7

## 1.1.11

### Patch Changes

- 8b25516: Deprecate MiniMax-M2.1

## 1.1.10

### Patch Changes

- e177dc2: Add GLM-5.1 to FSE model list

## 1.1.9

### Patch Changes

- 6e806c2: update whisper-large-v3
- 6e806c2: update get-available-model

## 1.1.8

### Patch Changes

- 342afa5: add k-exaone-236b-a23b model

## 1.1.7

### Patch Changes

- bbdecbb: deprecate fse models

## 1.1.6

### Patch Changes

- d56dcfc: add deepseek v3.2 in FSE

## 1.1.5

### Patch Changes

- f09ec79: Remove EXAONE-4.0.1 from FSE model list

## 1.1.4

### Patch Changes

- f97fb70: Remove K-EXAONE from FSE model list
- 3664158: Improve AI SDK compatibility in @friendliai/ai-provider by updating core SDK dependencies, wrapping Friendli JSON envelope chat errors as APICallError, and aligning chat usage and tool streaming events.

## 1.1.3

### Patch Changes

- a4954be: Add MiniMax-M2.5 to FSE model list

## 1.1.2

### Patch Changes

- f2f1abf: Add GLM-5 to FSE model list

## 1.1.1

### Patch Changes

- 5636c29: update-fse-models

## 1.1.0

### Minor Changes

- 7dbbdb5: Add interleaved thinking support for reasoning models like MiniMax-M2.1, GLM-4.7. Assistant messages with reasoning parts are now converted to include `reasoning_content` field in API requests, enabling multi-turn conversations to maintain reasoning context.

## 1.0.4

### Patch Changes

- e7ace16: Add `MiniMaxAI/MiniMax-M2.1` and remove `MiniMaxAI/MiniMax-M2` from FSE supported model list
- c09d857: remove deepseek r1 0528 from fse models

## 1.0.3

### Patch Changes

- df0f0b8: Fix finishReason format to match AI SDK v6 requirements and add proper text/reasoning event lifecycle

## 1.0.2

### Patch Changes

- fca96fa: Fix AI SDK v6 streaming protocol compliance

  This change fixes the streaming implementation to properly comply with the AI SDK v6 LanguageModelV3 protocol:

  **Fixed Issues:**

  - Added missing `text-start` and `reasoning-start` events at the beginning of content blocks
  - Changed incorrect event types from `text-part-finish` to `text-end` and `reasoning-part-finish` to `reasoning-end`
  - Implemented consistent ID tracking across the entire content block lifecycle

  **Event Sequence (Before):**

  ```
  text-delta → text-delta → text-part-finish (❌ incorrect)
  ```

  **Event Sequence (After):**

  ```
  text-start → text-delta → text-delta → text-end (✅ correct)
  ```

  This resolves the "text part ... not found" error that occurs when using the provider with AI SDK v6.

## 1.0.1

### Patch Changes

- 49b9dc7: add new fse model

## 1.0.0

### Major Changes

- 4dc62a9: Entering the AI ​​SDK v6 compatible migration

### Minor Changes

- 4dc62a9: Add Linkup integrated tool helper (`friendli.tools.linkupSearch`) for Tool Assisted API.
- 4dc62a9: ### Provider Tools Improvements
  - **Renamed tool functions** for cleaner API:
    - `webSearchBetaTool()` → `webSearch()`
    - `webUrlBetaTool()` → `webUrl()`
    - `mathCalendarBetaTool()` → `mathCalendar()`
    - `mathStatisticsBetaTool()` → `mathStatistics()`
    - `mathCalculatorBetaTool()` → `mathCalculator()`
    - `codePythonInterpreterBetaTool()` → `codePythonInterpreter()`
  - **Added streaming support for provider-executed tools**: Tool calls and results from Friendli's built-in tools (web search, calculator, etc.) are now properly streamed, allowing users to see tool execution progress in real-time.
  - **Fixed tool type compatibility**: Provider tools now correctly implement the AI SDK `Tool` type with `inputSchema`, resolving type errors when using `friendli.tools.*` with `generateText` or `streamText`.

### Patch Changes

- 4dc62a9: Fix LanguageModelV3FinishReason type compatibility with AI SDK v6

  Update finishReason handling to use the new object format `{ unified, raw }` instead of plain string, aligning with @ai-sdk/provider v3.0.0 type changes.

- 4dc62a9: Support Friendli serverless chat options (`topK` -> `top_k`, sampling providerOptions) and improve error propagation for HTTP and streaming tool-assisted responses.

## 1.0.0-beta.2

### Minor Changes

- 049179d: Add Linkup integrated tool helper (`friendli.tools.linkupSearch`) for Tool Assisted API.

### Patch Changes

- 049179d: Support Friendli serverless chat options (`topK` -> `top_k`, sampling providerOptions) and improve error propagation for HTTP and streaming tool-assisted responses.

## 1.0.0-beta.1

### Minor Changes

- 2ffbb78: ### Provider Tools Improvements
  - **Renamed tool functions** for cleaner API:
    - `webSearchBetaTool()` → `webSearch()`
    - `webUrlBetaTool()` → `webUrl()`
    - `mathCalendarBetaTool()` → `mathCalendar()`
    - `mathStatisticsBetaTool()` → `mathStatistics()`
    - `mathCalculatorBetaTool()` → `mathCalculator()`
    - `codePythonInterpreterBetaTool()` → `codePythonInterpreter()`
  - **Added streaming support for provider-executed tools**: Tool calls and results from Friendli's built-in tools (web search, calculator, etc.) are now properly streamed, allowing users to see tool execution progress in real-time.
  - **Fixed tool type compatibility**: Provider tools now correctly implement the AI SDK `Tool` type with `inputSchema`, resolving type errors when using `friendli.tools.*` with `generateText` or `streamText`.

## 1.0.0-beta.0

### Major Changes

- 3044ef8: Entering the AI ​​SDK v6 compatible migration

## 0.3.4

### Patch Changes

- 795d5bf: add minimax-m2 in FSE

## 0.3.3

### Patch Changes

- a6180ef: add deepseek v3.1 in FSE

## 0.3.2

### Patch Changes

- 0e44c15: Update FSE model list

## 0.3.1

### Patch Changes

- d6a924b: For convenience, parse_reasoning is set to true by default.

## 0.3.0

### Patch Changes

- 10ab7aa: add chat_template_kwargs option
- 10ab7aa: Added supported type model to friendli-provider
- 10ab7aa: bump v5 package latest
- 10ab7aa: dump deps (alpha.6)
- 10ab7aa: Initial build for ai sdk v5 support (broken Friendli compatibility)
- 10ab7aa: As of 25.08.19, the latest serverless list and model list are synchronized.
- 10ab7aa: enable regex on v5 (beta)
- 10ab7aa: Add getAvailableModels() for dynamic model discovery
  ref: https://vercel.com/docs/ai-gateway/models-and-providers#dynamic-model-discovery
- 10ab7aa: enable support Tool Assisted API

## 0.3.0-beta.7

### Patch Changes

- ac374ab: Add getAvailableModels() for dynamic model discovery
  ref: https://vercel.com/docs/ai-gateway/models-and-providers#dynamic-model-discovery

## 0.3.0-beta.6

### Patch Changes

- 0ed9e14: As of 25.08.19, the latest serverless list and model list are synchronized.

## 0.3.0-beta.5

### Patch Changes

- 40e93c0: bump v5 package latest

## 0.3.0-alpha.4

### Patch Changes

- be3a6bf: add chat_template_kwargs option
- 74cc1e2: dump deps (alpha.6)

## 0.2.7-alpha.2

### Patch Changes

- 07b0162: enable regex on v5 (beta)
- 3f15a05: enable support Tool Assisted API

## 0.2.7-alpha.1

### Patch Changes

- dda6520: Added supported type model to friendli-provider

## 0.2.7-alpha.0

### Patch Changes

- 5ec8524: Initial build for ai sdk v5 support (broken Friendli compatibility)

## 0.2.6

### Patch Changes

- 3e347dc: bump dependencies version

## 0.2.5

### Patch Changes

- 0db11c5: llama 3.1 70b removal

## 0.2.4

### Patch Changes

- 3be71b2: add deepseek r1 model

## 0.2.3

### Patch Changes

- 3085e03: update serverless model list

## 0.2.2

### Patch Changes

- b3e1fb1: Add Model Llama 3.3 70B Serverless

## 0.2.1

### Patch Changes

- edc5931: fix parallel tool call

## 0.2.0

### Minor Changes

- f262011: convert-openai-compatible-components
  - dedicated, serverless automatic switching
  - /v1/completion available
  - Improved error parsing logic
  - Update dependency packages
  - Liquidate some of the legacy
  - Other minor bug fixes

### Patch Changes

- bcdf26e: Convert regex input to RegExp type

## 0.1.25

### Patch Changes

- 894764d: fix model list

## 0.1.24

### Patch Changes

- 6b241b6: add exaone

## 0.1.23

### Patch Changes

- d51f04e: update dependencies, @ai-sdk/provider-utils@2.0.3

## 0.1.22

### Patch Changes

- 0fc7b03: Add Llama vision 11b support

## 0.1.21

### Patch Changes

- 89b09de: Built-in tool non-streaming support

## 0.1.20

### Patch Changes

- 7caa63e: ## Updated code to match ai sdk 4.0.10
  - createFriendliAI -> createFriendli
  - Dependency Update
  - Updated tool call parsing logic
  - Improved object creation logic
  - Added regex output support
  - delete "content_filter", "function_call" finish reason

## 0.1.19

### Patch Changes

- 868452c: inference.friendli.ai -> api.friendli.ai

## 0.1.18

### Patch Changes

- ba2f03e: First setup with turbo pack
