{"id":22697077,"url":"https://github.com/patelvivekdev/mixedbread-ai-provider","last_synced_at":"2025-08-01T03:34:30.752Z","repository":{"id":261118120,"uuid":"882132433","full_name":"patelvivekdev/mixedbread-ai-provider","owner":"patelvivekdev","description":"The Mixedbread AI Provider is a provider for the Vercel AI SDK. It provides a simple interface to the Mixedbread AI API.","archived":false,"fork":false,"pushed_at":"2024-11-19T06:04:02.000Z","size":168,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-30T23:18:23.249Z","etag":null,"topics":["ai","embeddings","mixedbread","ranking","vercel-ai-sdk"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/mixedbread-ai-provider","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/patelvivekdev.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-02T00:51:14.000Z","updated_at":"2024-11-19T06:04:05.000Z","dependencies_parsed_at":"2024-11-04T20:18:16.637Z","dependency_job_id":"758eaab3-9421-44cb-9b18-733329d9d329","html_url":"https://github.com/patelvivekdev/mixedbread-ai-provider","commit_stats":null,"previous_names":["patelvivekdev/mixedbread-ai-provider"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/patelvivekdev/mixedbread-ai-provider","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patelvivekdev%2Fmixedbread-ai-provider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patelvivekdev%2Fmixedbread-ai-provider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patelvivekdev%2Fmixedbread-ai-provider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patelvivekdev%2Fmixedbread-ai-provider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patelvivekdev","download_url":"https://codeload.github.com/patelvivekdev/mixedbread-ai-provider/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patelvivekdev%2Fmixedbread-ai-provider/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268165534,"owners_count":24206383,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","embeddings","mixedbread","ranking","vercel-ai-sdk"],"created_at":"2024-12-10T05:12:03.407Z","updated_at":"2025-08-01T03:34:30.744Z","avatar_url":"https://github.com/patelvivekdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI SDK - Mixedbread AI Provider\n\n## Introduction\n\nThe Mixedbread AI Provider is a provider for the AI SDK. It provides a simple interface to the Mixedbread AI API.\n\n## Installation\n\n```bash\nnpm install mixedbread-ai-provider\n\n# or\n\nyarn add mixedbread-ai-provider\n\n# or\n\npnpm add mixedbread-ai-provider\n\n# or\n\nbun add mixedbread-ai-provider\n```\n\n## Configuration\n\nThe Mixedbread AI Provider requires an API key to be configured. You can obtain an API key by signing up at [Mixedbread](https://mixedbread.com).\n\nadd the following to your `.env` file:\n\n```bash\nMIXEDBREAD_API_KEY=your-api-key\n```\n\n## Usage\n\n```typescript\nimport { mixedbread } from 'mixedbread-ai-provider';\nimport { embedMany } from 'ai';\n\nconst embeddingModel = mixedbread.textEmbeddingModel(\n  'mixedbread-ai/mxbai-embed-large-v1',\n);\n\nexport const generateEmbeddings = async (\n  value: string,\n): Promise\u003cArray\u003c{ embedding: number[]; content: string }\u003e\u003e =\u003e {\n  // Generate chunks from the input value\n  const chunks = value.split('\\n');\n\n  // Optional: You can also split the input value by comma\n  // const chunks = value.split('.');\n\n  // Or you can use LLM to generate chunks(summarize) from the input value\n\n  const { embeddings } = await embedMany({\n    model: embeddingModel,\n    values: chunks,\n  });\n  return embeddings.map((e, i) =\u003e ({ content: chunks[i], embedding: e }));\n};\n```\n\n### Add settings to the model\n\nThe settings object should contain the settings you want to add to the model. You can find the available settings for the model in the Mixedbread API documentation: https://www.mixedbread.com/api-reference/endpoints/embeddings\n\n```typescript\nconst mixedbread = createMixedbread({ apiKey: process.env.MIXEDBREAD_API_KEY });\n\n// Initialize the embedding model\nconst embeddingModel = mixedbread.textEmbeddingModel(\n  'mixedbread-ai/mxbai-embed-large-v1',\n  // adding settings\n  {\n    prompt: 'Generate embeddings for text', // Max 256 characters\n    normalized: true,\n    dimensions: 768, // Max model dimensions\n    truncationStrategy: 'end',\n  },\n);\n```\n\n## Authors\n\n- [patelvivekdev](https://patelvivek.dev)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatelvivekdev%2Fmixedbread-ai-provider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatelvivekdev%2Fmixedbread-ai-provider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatelvivekdev%2Fmixedbread-ai-provider/lists"}