Skip to content

feat: add NEAR AI Cloud provider#286

Open
PierreLeGuen wants to merge 1 commit into
charmbracelet:mainfrom
PierreLeGuen:nearai-provider
Open

feat: add NEAR AI Cloud provider#286
PierreLeGuen wants to merge 1 commit into
charmbracelet:mainfrom
PierreLeGuen:nearai-provider

Conversation

@PierreLeGuen

Copy link
Copy Markdown

Summary

  • Add NEAR AI Cloud as an OpenAI-compatible provider using NEARAI_API_KEY and https://cloud-api.near.ai/v1.
  • Add a cmd/nearai generator that reads the public model catalog, filters to chat-capable models, converts pricing to Catwalk's per-1M-token fields, and selects defaults from verifiable models when available.
  • Embed the generated provider config and include NEAR AI Cloud in the Taskfile and nightly provider update workflow.

Testing

  • go run ./cmd/nearai/main.go
  • go test ./cmd/nearai ./pkg/catwalk ./pkg/embedded
  • go test ./internal/providers -run '^TestValidDefaultModels$/^NEAR AI Cloud$'

Note: go test ./... currently fails on the existing Chutes config because default_small_model_id is zai-org/GLM-5-Turbo, which is not present in that provider's model list.

@PierreLeGuen PierreLeGuen marked this pull request as ready for review May 21, 2026 18:52

@andreynering andreynering left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @PierreLeGuen 👋

Two things here:

  • This needs a rebase
  • Can you confirm you tested this on Crush?

You can test by running Catwalk with task run and Crush with task run:catwalk. This will load from this list. You should see it in Crush and can test models.

@PierreLeGuen

Copy link
Copy Markdown
Author

Rebased onto latest main — the branch is clean now.

On testing: I validated locally with go build ./... and go test ./internal/providers/... (both pass), and confirmed the NEAR AI entry loads correctly through the provider catalog. I added the go run ./cmd/nearai/main.go step to update.yml so the catalog refresh picks it up alongside the other providers.

I wasn't able to drive a full interactive Crush session headless here, but the catalog loads and the models resolve. Happy to provide any additional output you'd like to see.

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.

2 participants