Skip to content

fix: test provider add --use and expose model token limits - #169

Merged
hetaoBackend merged 1 commit into
mainfrom
codex/provider-add-use-limits
Sep 18, 2026
Merged

hetaoBackend merged 1 commit into
mainfrom
codex/provider-add-use-limits

Conversation

@hetaoBackend

@hetaoBackend hetaoBackend commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Change

Fixes #157. mcode provider add --use now tests the first model through the existing candidate transaction, then saves and selects it. A failed connection test exits nonzero with an explicit no-save message and leaves the provider configuration and default model unchanged. Adding without --use still saves without testing or selecting a model.

Fixes #161. Add --context-limit and --output-limit with positive safe-integer validation. Either can be supplied independently; the values apply to every repeated --model. Persisted limits are exposed as contextLimit and maxOutputTokens in provider list --json. Update both READMEs and the model examples. No provider-update command or low-level configuration writer changes.

Validation

  • PASS: focused provider application tests (17), typecheck, build, source inventory/generated paths, git diff --check.
  • PASS: built CLI smoke tests (8), including zero, negative, fractional, non-finite and unsafe-integer rejection before runtime startup.
  • PASS: built CLI offline BYOK fixture: successful candidate test/save/selection, HTTP 401 without persistence, repeated models, each limit independently, unchanged no-flags behavior, JSON/YAML readback, default-model execution without managed login, explicit model override, conversation resume and real file-tool execution. Synthetic credentials and temporary data; external traffic blocked.
  • PASS: pnpm verify full profile on clean committed HEAD e6384134d986280ae6b175392b3338761e5b34e6: all 14 macOS gates, including source export, capability tests, artifact/smoke/BYOK checks, permission policy and sandbox tests.
  • NOT RUN locally: Linux/Windows and live external provider acceptance. Local validation uses macOS arm64 and Node 26.4.0; CI provides the Node 24 platform matrix.

Publication and contribution checks

  • I have permission to contribute these changes under the existing licenses applicable to the changed files/packages; imported material and its provenance are identified and existing notices are preserved.
  • No credentials, account data, real user content, internal source history or private review material is included.
  • Only existing files changed; no inventory regeneration or new test-suite declaration is needed.
  • Shared English/Chinese documentation is updated. Offline results are not described as live-service acceptance.

Maintainer handoff

Publication scope or license changes: none.

Shared-source port: pending.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@hetaoBackend
hetaoBackend merged commit 149d764 into main Sep 18, 2026
8 checks passed
@hetaoBackend
hetaoBackend deleted the codex/provider-add-use-limits branch September 18, 2026 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant