Skip to content

feat(providers): add AICraft OpenAI-compatible provider template - #6171

Closed
BX166 wants to merge 3 commits into
Hmbown:mainfrom
BX166:add-aicraft-provider
Closed

BX166 wants to merge 3 commits into
Hmbown:mainfrom
BX166:add-aicraft-provider

Conversation

@BX166

@BX166 BX166 commented Sep 14, 2026

Copy link
Copy Markdown

Summary

Adds AICraft (aicraftapi.com) as an OpenAI-compatible provider setup template, following the same descriptor-row pattern as SenseNova, Baseten, Groq, Cerebras, and Command Code.

  • AICRAFT_TEMPLATE_ID = "aicraft"
  • AICRAFT_BASE_URL = "https://aicraftapi.com/v1"
  • AICRAFT_DEFAULT_MODEL = "claude-4.6-sonnet"
  • AICRAFT_API_KEY_ENV = "AICRAFT_API_KEY"

Changes

  • Four new consts plus one ProviderSetupApply::Compatible descriptor row, inserted before the unpublished agnes entry.
  • Updated settings_value_names_fillable_then_unpublished to include aicraft in the fillable list.
  • Added an aicraft entry to hosted_openai_compat_hosts_are_templates_not_enum_variants.
  • Updated the module header comment.

Test plan

  • The two touched unit tests (settings_value_names_fillable_then_unpublished, hosted_openai_compat_hosts_are_templates_not_enum_variants) are expected to pass under the existing crates/config test suite.

Devin Review

No-Issue: provider setup template addition; no tracking issue was filed for AICraft. (Line added by a maintainer to satisfy the required link check — the contribution itself is unchanged.)

@BX166
BX166 requested a review from Hmbown as a code owner September 14, 2026 11:46
@github-actions

Copy link
Copy Markdown
Contributor

Thanks @BX166 for taking the time to contribute.

This repository is observing a maintainer-managed PR intake gate in dry-run mode, so this pull request is staying open. This note helps maintainers prepare the allowlist before any enforcement is considered.

Please read CONTRIBUTING.md for the expected contribution shape. A maintainer can grant recurring PR access by commenting /lgtm on a pull request.

devin-ai-integration[bot]

This comment was marked as resolved.

@BX166

BX166 commented Sep 14, 2026

Copy link
Copy Markdown
Author

Addressed the review: AICraft is now documented in docs/PROVIDERS.md alongside the other compatible templates. The new row sits between Command Code and Agnes:

| AICraft | compatible | ```https://aicraftapi.com/v1``` | ```claude-4.6-sonnet``` | ```AICRAFT_API_KEY``` |

This satisfies every_compatible_template_is_documented_for_operators (display name, base URL, and API key env are all present).

Hmbown commented Sep 16, 2026

Copy link
Copy Markdown
Owner

thank you! will work on getting this in

Hmbown added a commit that referenced this pull request Sep 16, 2026
Once `aicraft` joins the tuple in
`hosted_openai_compat_hosts_are_templates_not_enum_variants` the line exceeds
the width, so `cargo fmt --all -- --check` rejected it and the required Lint
check stayed red.

Applied by a maintainer rather than sent back as a review round-trip. The
contribution is unchanged; only its formatting. Pushing to the fork was refused
despite maintainerCanModify, so this lands on an integration branch per
AGENTS.md.
@Hmbown

Hmbown commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Thank you for this, @BX166 — and I'm sorry it took the route it did.

I'm closing it, but not because anything was wrong with the work. It followed
the descriptor-row pattern exactly, the tests were updated correctly, and you
came back and documented AICraft in docs/PROVIDERS.md when that was asked for.
The problem is the thing it plugs into.

We're removing provider setup templates entirely (#6289). The founder's call
today: these named hosts "were never supposed to" be special-cased, and should be
ordinary providers like every other OpenAI-compatible route. Codewhale already
has a full generic mechanism for that — [providers.<name>] with a base URL, a
model and a key env — so the template list was a compiled-in list of blessed
vendors that duplicated a capability users already had. Your PR is the eleventh
entry in a table that is about to stop existing, which is our architecture
problem, not your contribution's.

AICraft stays supported. I checked it out, and it's a real service — Hainan
AICraft Matrix Technology Co., Ltd., ICP 琼ICP备2026009730号-1, an aggregator
fronting DeepSeek, Qwen, GLM, MiniMax and Doubao. Nothing about it gave me
pause. Once #6289 lands, it works the same way every other compatible host does,
and I've carried your base URL and key env into that issue so the replacement
docs keep them.

One correction worth having on the record: the PR set the default model to
claude-4.6-sonnet, but AICraft doesn't advertise any Anthropic models — their
own site lists DeepSeek, Qwen, GLM, MiniMax and Doubao. I've noted on #6289 not
to carry that default across.

Two things that went wrong on our side, so you know none of it was you:

  • Your CI never ran at all from Sept 14 until today. As a first-time
    contributor every workflow run parks at action_required until a maintainer
    approves it, and nobody had. That's a repo setting.
  • The Lint failure was a six-line rustfmt wrap that we should have taken care
    of rather than sending back. I did fix it on our side.

If you want to keep contributing here — and I hope you do — #6289 itself is open,
and the replacement docs for compatible providers would be a natural place to
land AICraft properly.

@Hmbown Hmbown closed this Sep 16, 2026
Hmbown pushed a commit that referenced this pull request Sep 16, 2026
#6171 added AICraft as an eleventh provider setup template. It is closed
unmerged — not because anything was wrong with it, but because it is what made
the template layer's cost visible, and the decision now is to remove that layer
entirely and let named OpenAI-compatible hosts be ordinary providers (#6289).

A contribution that changes a design is a contribution. Credited in the
"Reports and reproductions" half of the band rather than "Merged or adapted",
because the honest claim is that it shaped a decision, not that its code
shipped.

All four credit surfaces move together, which the contract requires: the
`### Contributors` block in `CHANGELOG.md`, the v0.9.14 band in
`docs/CONTRIBUTORS.md`, `RELEASE_HELPERS` in `web/lib/release-credits.ts`, and
`repository.requiredCandidateCredits` in `docs/public-surface-facts.json`.
`public-copy.test.ts` asserts the handle sets are identical across the first
three, so a partial update is a red build rather than a quiet omission — which
is the right shape for a credit gate.

Their base URL and key env are carried into #6289 so the replacement docs keep
them, and the note not to carry `claude-4.6-sonnet` across is recorded there
too: AICraft advertises DeepSeek, Qwen, GLM, MiniMax and Doubao, and lists no
Anthropic models.

Tests: `npx vitest run` in `web/` — 51 files, 471 tests, all passing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: CodeWhale Bot <bot@codewhale.net>
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