Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Feature: Make create-onchain-agent templates LLM provider-agnostic

Open
#1,106 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Quiet
Tech stack
typescript

Research direction

Locate the TypeScript create-onchain-agent template and inspect the generated create-agent.ts and .env.local files, along with the existing @ai-sdk/openai and @langchain/openai usage. Verify the generated agent can select a provider through the proposed environment variables, retains the OPENAI_API_KEY fallback, and runs with npm run dev without editing source files.

Written by the indexing model from the issue text.

Description

Language Implementation
  • Python
  • TypeScript
Feature Type
  • Action Provider Template
  • Wallet Provider Template
  • Framework Extension
  • Core Requirements
  • Other
🚀 The feature, motivation and pitch

The create-onchain-agent templates currently hardcode OpenAI as the LLM provider. The generated create-agent.ts uses import { openai } from "@ai-sdk/openai" and calls openai.chat("gpt-4o-mini") directly, and the generated .env.local only includes OPENAI_API_KEY=.

This means a developer using any other provider (Anthropic, Google, OpenRouter, Groq, Ollama, etc.) has to open create-agent.ts and rewrite the model initialization before they can even run the agent.

This is unnecessary because @ai-sdk/openai and @langchain/openai — the packages already installed in the template — natively support connecting to any OpenAI-compatible API via their baseURL option. And all major LLM providers now expose OpenAI-compatible endpoints (Anthropic, Google Gemini, OpenRouter, Groq, Together AI, Ollama).

Proposal: Replace the hardcoded openai("gpt-4o-mini") singleton with createOpenAI({ apiKey, baseURL }) configured via environment variables:

  • AI_API_KEY — API key for any provider (falls back to OPENAI_API_KEY)
  • AI_BASE_URL — provider's endpoint (optional, defaults to OpenAI)
  • AI_MODEL — model identifier (optional, defaults to gpt-4o-mini)

The generated .env.local would include inline examples for all major providers, so a developer with an Anthropic key can just set two env vars and run npm run dev — no code changes needed.

This change:

  • Adds zero new dependencies (uses createOpenAI/ChatOpenAI already installed)
  • Is fully backward-compatible (falls back to OPENAI_API_KEY if AI_API_KEY is not set)
  • Matches how the core @coinbase/agentkit library already works: fully LLM-agnostic
Alternatives

Let developers manually edit create-agent.ts after scaffolding. This is the current approach but creates friction for anyone not using OpenAI.

Additional context

The core @coinbase/agentkit library and all framework extensions (agentkit-langchain, agentkit-vercel-ai-sdk) are already fully LLM-agnostic. The OpenAI lock-in exists only in the scaffolding layer. The Python create-onchain-agent has the same issue.

Dominant language
TypeScript
Stars
1.3k
Forks
831
Avg merge
13h 31m
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from coinbase/agentkit

All issues in coinbase/agentkit

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.