Skip to content

fix(providers): correct Gitlawb GMI probing and drain stale baseline - #124

Merged
bloodf merged 4 commits into
devfrom
fix/v2/baseline-other
Jul 10, 2026
Merged

bloodf merged 4 commits into
devfrom
fix/v2/baseline-other

Conversation

@bloodf

@bloodf bloodf commented Jul 9, 2026 •

Copy link
Copy Markdown
Owner

Scope

This reworks the Gitlawb GMI connection probe on current dev@dd11086b69b835fd80a2553ecda6169d2ffa9bf5 and consolidates the 16 verified stale-baseline deletions from #118, #119, #123, and #124.

  • Correct Gitlawb GMI runtime/probe traffic to https://opengateway.gitlawb.com/v1/gmi-cloud/chat/completions.
  • Keep model discovery on https://opengateway.gitlawb.com/v1/gmi-cloud/models and publish an OpenAI-compatible model fetcher.
  • Resolve the registry provider to its configured alias so the probe sends the real default model (XiaomiMiMo/MiMo-V2.5-Pro).
  • Treat 2xx/400/422/429 as authenticated, 401/403 as credential rejection, 404 as an endpoint error, and 5xx/network failures as provider unavailability.
  • Propagate sanitized probe failures through both connection-test and provider-validation APIs without exposing API keys.
  • Replace the MITM test's inline fake with isolated calls to production ensureRootCASync.
  • Register translators explicitly in the normalization test and refresh the Gitlawb golden URL and generated agent index.

Source and intentional divergence

The original OmniRoute provider source is commit 3ddcee6369c54e1c844a6e46cbbc79870d10d30b. The relevant registry, validator, and test blobs are unchanged on audited OmniRoute main@9cd18bf9a11b7d2e8c037c374631b492adabf469. The detailed source lineage is OmniRoute #2837.

OmniRoute #2476 later made Gitlawb keys optional. DurinDoor still requires a key in its API-key UI and validation route. This PR deliberately defers optional-key parity until UI, API, no-auth runtime, persistence/import, and end-to-end tests can be changed together.

Baseline impact

tests/__baseline__/known-fails.txt changes from 67 to 51 entries: exactly 16 deletions and zero additions.

The isolated local fail-closed gate on Node 20.20.2/npm 10.8.2 reports 17 raw failures, all 17 known, 34 stale entries, zero additions, and no startup/collection error. Linux CI remains authoritative before merge.

Verification

All commands used temporary HOME and DATA_DIR values.

# clean exact dependency installations
npm ci
cd tests && npm ci

# focused behavior and regression coverage
npx vitest run --config vitest.config.js \
  unit/gitlawb-gmi-connection-test.test.js \
  unit/provider-test-utils.test.js \
  unit/provider-validation.test.js \
  translator/golden-url-header.test.js \
  unit/omniroute-missing-api-cloud-providers.test.js \
  unit/mitm-root-ca.test.js \
  unit/mitm-rootca-autogen.test.js \
  unit/translator-request-normalization.test.js \
  unit/xai-oauth-service.test.js
# 9 files, 402 tests passed

BASELINE_BASE_REF=origin/dev npm run test:ci
# exit 0; raw 17, known 17, stale 34, additions 0

npm run lint -- --quiet
npm run check:agent-index
npm run build
npx --package=@commitlint/cli@20.5.3 \
  --package=@commitlint/config-conventional@20.5.0 \
  commitlint --config .commitlintrc.cjs --from=origin/dev --to=HEAD
# all exit 0

Fresh JSON and JUnit reports were generated and parsed locally; CI uploads both artifacts on every run.

Documentation, migration, and compatibility

  • Updated scoped OmniRoute review documentation and regenerated open-sse/AGENT-INDEX.md.
  • No schema migration or stored-data rewrite.
  • No API-key secret rotation, rewrite, or logging.
  • No change to legacy key shapes, provider aliases, request headers, or accepted data paths.
  • No root REPORT.md, dependency symlink, or baseline addition is included.

Merge policy: squash only after all required checks pass and all review threads are resolved.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3571fb130b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/app/api/providers/providerProbe.js Outdated
@bloodf
bloodf force-pushed the fix/v2/baseline-other branch from 3571fb1 to 5584f8f Compare July 9, 2026 00:31
@bloodf bloodf changed the title test(baseline): drain gitlawb-gmi connection test from 3-day window fix(providers): gitlawb-gmi validateUrl + providerProbe baseUrl-only fallback (baseline test entry retained) Jul 9, 2026
bloodf pushed a commit that referenced this pull request Jul 9, 2026
Continue draining the known-fails.txt entries that TeamBaselineOtherV2
identified in the 3-day review. This batch covers:

- codex-refresh-token (2)
- force-stream-config (2)
- db-driver-chain (1)
- db-sqlite-vs-lowdb (1) — source fix in src/lib/db/repos/usageRepo.js
- build-models-list-noauth (1) — source fix in src/app/api/v1/models/buildModelsList.js
- command-code-validation (1) — source fix in src/app/api/providers/validate/route.js
- gitlab-duo-registry (1) — source fix in open-sse/providers/registry/gitlab-duo.js
- omniroute-simple-a-providers (2) — source fix in open-sse/providers/registry/agentrouter.js
- omniroute-simple-a-review-fixes (2) — source fix in src/app/api/providers/validate/route.js + src/app/api/providers/suggested-models/filters.js
- omniroute-simple-c-providers (1) — source fix in open-sse/providers/registry/index.js
- zenmux-free (1) — source fix in open-sse/executors/index.js
- openai-to-kiro (1)
- agentrouter-provider (2, collateral)

The 3 entries already in PR #124 (gitlawb-gmi, providerProbe, one known-fails line)
are NOT touched here. This branch is a clean rebase onto origin/dev with
only the additional changes from the 9-file batch.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5584f8f779

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/__baseline__/known-fails.txt Outdated
@bloodf
bloodf force-pushed the fix/v2/baseline-other branch 3 times, most recently from e1ef7eb to 74cd58b Compare July 9, 2026 00:37

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 74cd58b300

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/node_modules Outdated
Comment thread open-sse/providers/registry/gitlawb-gmi.js
@bloodf
bloodf force-pushed the fix/v2/baseline-other branch from 74cd58b to 852a8d5 Compare July 9, 2026 01:07
…awb-gmi JSDoc)

- open-sse/providers/registry/gitlawb-gmi.js: JSDoc on the probeUsesBaseUrl
  flag (Codex comment id 3548101977).
- src/app/api/providers/providerProbe.js: resolve provider alias before
  getDefaultModel so the probed model comes from the registry
  (XiaomiMiMo/MiMo-V2.5-Pro) instead of falling back to 'test' (Codex
  comment id 3548048472).
- tests/__baseline__/known-fails.txt: remove the gitlawb-gmi entry now
  that the test exercises the base URL with a real model and succeeds
  (Codex comment id 3548083460).
- tests/unit/gitlawb-gmi-connection-test.test.js: assert the body uses
  the registry's MiMo-V2.5-Pro model id.

Recreated from inspected commit 809b9819a; manually committed under
durindoor-agent identity to satisfy user model constraint (no GPT-5.5).
@bloodf bloodf changed the title fix(providers): gitlawb-gmi validateUrl + providerProbe baseUrl-only fallback (baseline test entry retained) fix(providers): correct Gitlawb GMI probing and drain stale baseline Jul 10, 2026
@bloodf
bloodf merged commit 6457d95 into dev Jul 10, 2026
3 checks passed
@bloodf
bloodf deleted the fix/v2/baseline-other branch July 17, 2026 02:49
@bloodf bloodf mentioned this pull request Jul 20, 2026
7 of 8 tasks
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.

1 participant