Skip to content

feat: add Tzafon model provider#289

Open
eddieogola wants to merge 3 commits intoinngest:mainfrom
eddieogola:feat/add-tzafon-model-provider
Open

feat: add Tzafon model provider#289
eddieogola wants to merge 3 commits intoinngest:mainfrom
eddieogola:feat/add-tzafon-model-provider

Conversation

@eddieogola
Copy link

@eddieogola eddieogola commented Feb 13, 2026

Summary

  • Re-exports tzafon model creator from @inngest/ai, making Tzafon a first-class model provider in AgentKit
  • Adds a custom Tzafon adapter that strips tools and tool_choice from requests, since Tzafon rejects them with HTTP 400
  • Adds Tzafon format handler for Authorization: Bearer auth in model.ts

Files changed

File Change
packages/agent-kit/src/models.ts Add tzafon to the re-export from @inngest/ai
packages/agent-kit/src/adapters/tzafon.ts New adapter — wraps OpenAI parsers, strips tools/tool_choice
packages/agent-kit/src/adapters/index.ts Register Tzafon adapter
packages/agent-kit/src/model.ts Add tzafon format handler (Bearer auth)

Usage

import { createAgent, createNetwork, tzafon } from "@inngest/agent-kit";

const agent = createAgent({
  name: "assistant",
  system: "You are a helpful assistant.",
  model: tzafon({ model: "tzafon.sm-1" }),
});

Why a custom adapter?

Tzafon is OpenAI-compatible for chat completions but does not support tool/function calling. When the tools parameter is included in requests, Tzafon returns:

HTTP 400: "auto" tool choice requires --enable-auto-tool-choice and --tool-call-parser to be set

The adapter follows the same pattern as Grok (wraps OpenAI parsers with format-specific modifications), but instead of disabling strict mode, it removes tools and tool_choice entirely.

Dependency

This PR depends on inngest/inngest-js#1309, which adds the tzafon() model creator and "tzafon" format to @inngest/ai. That PR must be merged and released first, then @inngest/ai should be bumped in packages/agent-kit/package.json before this PR can be merged.

Test plan

  • Merge upstream dependency inngest/inngest-js#1309 first
  • Bump @inngest/ai to the version containing tzafon
  • pnpm build compiles successfully
  • pnpm test passes
  • Verify tzafon() is importable from @inngest/agent-kit
  • Verify requests to Tzafon API do not include tools or tool_choice

🤖 Generated with Claude Code

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-bot
Copy link

changeset-bot bot commented Feb 13, 2026

🦋 Changeset detected

Latest commit: 29a5f47

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@inngest/agent-kit Minor

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>
- 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>
@eddieogola eddieogola marked this pull request as draft February 28, 2026 10:41
@eddieogola eddieogola marked this pull request as ready for review February 28, 2026 10:41
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