Skip to content

Conversation

harel-tussi
Copy link

@harel-tussi harel-tussi commented Oct 12, 2025

Add support for AI21's Jamba language models (jamba-large and jamba-mini). The provider supports text generation through the OpenAI-compatible API endpoint at https://api.ai21.com/studio/v1/.

Features:

  • Support for jamba-large and jamba-mini models
  • Text generation capabilities
  • OpenAI-compatible API integration
  • Custom metadata extraction for cache hit/miss tokens
  • Full test coverage

Configuration:

Background

Summary

Manual Verification

Checklist

  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • Formatting issues have been fixed (run pnpm prettier-fix in the project root)
  • I have reviewed this pull request (self-review)

Future Work

Related Issues

Add support for AI21's Jamba language models (jamba-large and jamba-mini).
The provider supports text generation through the OpenAI-compatible API
endpoint at https://api.ai21.com/studio/v1/.

Features:
- Support for jamba-large and jamba-mini models
- Text generation capabilities
- OpenAI-compatible API integration
- Custom metadata extraction for cache hit/miss tokens
- Full test coverage

Configuration:
- Base URL: https://api.ai21.com/studio/v1
- Environment variable: AI21_API_KEY
- Provider: ai21.com
- User agent: ai-sdk/ai21/VERSION
AI21 API doesn't provide prompt cache metrics (prompt_cache_hit_tokens,
prompt_cache_miss_tokens) like DeepSeek does. The standard usage metrics
(prompt_tokens, completion_tokens, total_tokens) are already handled by
the OpenAI-compatible provider, so a custom metadata extractor is not needed.
harel-tussi and others added 2 commits October 12, 2025 16:51
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant