Repository navigation
feat(tui): rename gateway provider to netGate, name custom providers - #137
Merged
Merged
Conversation
Port of codev-hub PR #212. The SSO configure flow now writes the provider block as provider.netgate / "netGate" instead of provider.aigateway / "AI Gateway"; the Custom provider flow asks for an optional provider name, slugs it into the id ([a-z0-9-], 32-char cap) with a live preview, falls back to ai-gateway / "AI Gateway", and writes the name as the block's display name. auth-file.ts models the hub's provider_id/provider_name pair and clears it on provider-less saves so a fresh SSO key never keeps a stale manual identity. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
quickbeard
force-pushed
the
netgate-provider-rename
branch
from
July 30, 2026 10:28
d78ffb0 to
b5c32f1
Compare
quickbeard
added a commit
that referenced
this pull request
Jul 30, 2026
…dels (#139) A config model entry with no `modalities` resolves image input to false, so ProviderTransform.message replaced an attached image with an "ERROR: Cannot read image" note before the request and the model answered that it couldn't see anything — even when the endpoint supports vision. Both blocks written by @codev/gateway (netGate configure flow and the custom provider flow) now declare `attachment: true` and `modalities: { input: ["text", "image"], output: ["text"] }` per model, mirroring codev-hub PR #219 so hub-written and self-configured codev.json stay identical. Every gateway model is now declared vision-capable including text-only ones: for those the endpoint rejects or ignores the image rather than the client silently dropping it. Tests cover the two upstream paths this depends on — config modality → model capability, and the part filtering in transform — plus the end-to-end PATCH body from the custom-provider TUI flow. That view test was already failing on main (it waits on the "Provider id" prompt renamed to "Provider name" in #137, and predates the provider `name` field); repaired here since it asserts the payload this changes. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
quickbeard
added a commit
that referenced
this pull request
Aug 2, 2026
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.
What
Port of the hub's provider-identity split (quickbeard/codev-hub#212) to CoDev Code's own config writers:
provider.netgatewith display namenetGateinstead ofprovider.aigateway/AI Gateway, and pinsmodel: "netgate/<model>".[a-z0-9-], 32-char cap) with a live→ id: <slug>preview under the field; a blank or unusable name falls back toai-gateway/AI Gateway, and the name is written as the provider block's display name so the model picker shows it instead of the bare id.New
packages/codev-gateway/src/provider.tsis the single owner of the identities and the slug (mirrors hubsrc/lib/provider.ts, minus the detection helpers — codev-code has no id-based config attribution).auth.json interop
The hub now persists
provider_id/provider_namein the shared~/.codev-hub/auth.jsonfor manually-named keys, and treatssaveApiKeyas a whole-block write where an omitted pair clears it.auth-file.tsadopts the same rule: the pair is modeled onApiKeyCreds, and a provider-less save (the SSO flow minting a fresh gateway key) explicitly clears a stale hub-written manual identity — the previous read-merge-write spread would have silently preserved it and the hub would misattribute the new key.Back-compat
provider.aigatewayblocks are left in place:Config.updateGlobalonly merges, never deletes, so re-runningcodev configureleaves the old block (and its picker entry) next to the newnetgateone until the hub's next full-file rewrite converges the config. Documented in the CHANGELOG.netgateconfig as CoDev-managed; the merged hub recognizesnetgate,ai-gateway, and legacyaigateway.DIVERGENCES.mdrows.Testing
test/provider.test.ts: slug table (ported from the hub's), 32-char cap without trailing dash, fallback identity.config-block.test.tsflipped tonetgate/netGate; asserts the custom block carriesname.auth-file.test.ts: provider pair round-trips and is cleared by a provider-less save.bun testinpackages/codev-gateway(35 pass) andbun run typecheckin bothcodev-gatewayandtui; targetedtest/cli/cmd/tui/provider-options.test.tsstill green.🤖 Generated with Claude Code