Open
Conversation
Re-export `tzafon` model creator from `@inngest/ai`, enabling Tzafon as a first-class model provider in AgentKit. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 29a5f47 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Tzafon rejects requests containing `tools` or `tool_choice` (HTTP 400). This adds a custom adapter following the Grok pattern that wraps the OpenAI parsers but strips these unsupported fields. Changes: - New `src/adapters/tzafon.ts` — strips tools/tool_choice from requests - Register Tzafon adapter in `src/adapters/index.ts` - Add Tzafon format handler in `src/model.ts` (Bearer auth) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
4 tasks
- New reference page: docs/reference/model-tzafon.mdx - Add Tzafon to models concept page (examples, model list, env var) - Add navigation entry in docs.json Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tzafonmodel creator from@inngest/ai, making Tzafon a first-class model provider in AgentKittoolsandtool_choicefrom requests, since Tzafon rejects them with HTTP 400Authorization: Bearerauth inmodel.tsFiles changed
packages/agent-kit/src/models.tstzafonto the re-export from@inngest/aipackages/agent-kit/src/adapters/tzafon.tstools/tool_choicepackages/agent-kit/src/adapters/index.tspackages/agent-kit/src/model.tstzafonformat handler (Bearer auth)Usage
Why a custom adapter?
Tzafon is OpenAI-compatible for chat completions but does not support tool/function calling. When the
toolsparameter is included in requests, Tzafon returns:The adapter follows the same pattern as Grok (wraps OpenAI parsers with format-specific modifications), but instead of disabling strict mode, it removes
toolsandtool_choiceentirely.Dependency
Test plan
@inngest/aito the version containingtzafonpnpm buildcompiles successfullypnpm testpassestzafon()is importable from@inngest/agent-kittoolsortool_choice🤖 Generated with Claude Code