Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/thin-geckos-breathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperbolic/ai-sdk-provider": major
---

Remove support for chat and completion models (our APIs are now entirely compatible with openrouter). Upgrade to AI SDK v6
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"turbo": "^2.3.4",
"typescript": "catalog:",
"vite-tsconfig-paths": "^5.1.4",
"vitest": "^2.0.5"
"vitest": "3.2.4"
},
"packageManager": "pnpm@9.15.4",
"engines": {
Expand Down
1 change: 0 additions & 1 deletion packages/ai-sdk-provider/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ APPENDIX: How to apply the Apache License to your work.
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2025 OpenRouter Inc,
Copyright 2025 Hyperbolic Labs Inc,

Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
54 changes: 11 additions & 43 deletions packages/ai-sdk-provider/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Hyperbolic Provider for Vercel AI SDK

The [Hyperbolic](https://hyperbolic.xyz/) provider for the [Vercel AI SDK](https://sdk.vercel.ai/docs) gives access to any model found at <https://app.hyperbolic.xyz/models>.

This is based on the [OpenRouter](https://openrouter.ai/) provider for the Vercel AI SDK, with a number of changes to support the Hyperbolic API and add image generation support.
The [Hyperbolic](https://hyperbolic.xyz/) provider for the [Vercel AI SDK](https://sdk.vercel.ai/docs) gives access to image models found at <https://app.hyperbolic.xyz/models>. For chat and completion models, use the [@openrouter/ai-sdk-provider](https://www.npmjs.com/package/@openrouter/ai-sdk-provider) package instead.

## Setup

Expand Down Expand Up @@ -33,53 +31,23 @@ import { generateText } from "ai";
import { createHyperbolic } from "@hyperbolic/ai-sdk-provider";

const hyperbolic = createHyperbolic({
apiKey: process.env.HYPERBOLIC_API_KEY, // Found in settings after logging in at https://app.hyperbolic.xyz
});

const { text } = await generateText({
model: hyperbolic.chat("deepseek-ai/DeepSeek-R1"),
prompt: "Write a vegetarian lasagna recipe for 4 people.",
apiKey: process.env.HYPERBOLIC_API_KEY, // Found in settings after logging in at https://app.hyperbolic.ai
});
```

## Supported models

This list is not a definitive list of models supported by Hyperbolic, as it constantly changes as we add new models (and deprecate old ones) to our system.
You can find the latest list of models supported by Hyperbolic [here](https://openrouter.ai/models).

## Using Models

### Language Models

```ts
const { text } = await generateText({
model: hyperbolic.chat("deepseek-ai/DeepSeek-R1"),
prompt: "Write a vegetarian lasagna recipe for 4 people.",
});

const { text } = await generateText({
model: hyperbolic.completion("deepseek-ai/DeepSeek-R1"),
prompt: "The capital of France is",
});
```

### Image Generation Models

```ts
import { experimental_generateImage as generateImage } from "ai";

// Text to Image
const { images } = await generateImage({
model: hyperbolic.image("SDXL1.0-base"),
prompt: "A beautiful sunset over a calm ocean",
size: "1024x1024",
const result = await generateImage({
model: hyperbolic.image("FLUX.1-dev"),
prompt: "An image of a man riding a horse in SF.",
size: `1020x1020`,
providerOptions: {
hyperbolic: {
cfgScale: 5,
steps: 30,
negativePrompt: "low quality, blurry, distorted",
enableRefiner: false,
} satisfies HyperbolicImageProviderOptions,
},
});
```

## Supported models

This list is not a definitive list of models supported by Hyperbolic, as it constantly changes as we add new models (and deprecate old ones) to our system.
You can find the latest list of models supported by Hyperbolic [here](https://app.hyperbolic.ai/models).
20 changes: 14 additions & 6 deletions packages/ai-sdk-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,25 @@
"@hyperbolic/eslint-config": "workspace:*",
"@hyperbolic/prettier-config": "workspace:*",
"@hyperbolic/tsconfig": "workspace:*",
"@types/json-schema": "7.0.15",
"ai": "^6.0.48",
"eslint": "catalog:",
"handlebars": "^4.7.8",
"msw": "2.12.4",
"prettier": "catalog:",
"tsup": "8.4.0",
"tsup": "8.5.0",
"type-fest": "^4.37.0",
"typescript": "catalog:"
"typescript": "catalog:",
"vite-tsconfig-paths": "^5.1.4",
"vitest": "3.2.4",
"zod": "^4.0.0"
},
"dependencies": {
"@ai-sdk/provider": "^1.1.3",
"@ai-sdk/provider-utils": "^2.2.8",
"ai": "^4.3.16",
"zod": "^3.24.2"
"@ai-sdk/provider": "^3.0.5",
"@ai-sdk/provider-utils": "^4.0.9"
},
"peerDependencies": {
"ai": "^6.0.48",
"zod": "^3.25.0 || ^4.0.0"
}
}
77 changes: 56 additions & 21 deletions packages/ai-sdk-provider/src/__generated__/models.gen.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading