Skip to content

feat(sdk): add active provider discovery query - #16

Closed
snowykr wants to merge 1 commit into
devfrom
feat/active-provider-public-sdk-q29
Closed

feat(sdk): add active provider discovery query#16
snowykr wants to merge 1 commit into
devfrom
feat/active-provider-public-sdk-q29

Conversation

@snowykr

@snowykr snowykr commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

Adds Q29, the public SDK query providers.list/active, rebased on current dev (c3637684).

Public contract

  • Returns deterministic, deduplicated, non-secret descriptors: { provider, connectionKind }.
  • Uses the existing retained-snapshot pagination contract.
  • Preserves exact Q10 provider IDs.
  • Q29 query execution does not invoke a model, refresh credentials, probe remotes, or expose credential/account data.

Eligibility and endpoint correctness

  • Discovery-only providers are returned only with current credential and endpoint-bound discovery evidence. The implementation binds each registry's discovery/cache result to its selected credential, fences stale overlapping refreshes before merging results or publishing the shared discovery cache, revalidates completed configured and descriptor results immediately before aggregate merge, accepts Xiaomi Token Plan’s credential-derived endpoint only when no explicit endpoint overrides it, requires successful current credentialless provenance for optional-auth fallback, recognizes descriptor-declared unauthenticated local providers only after fresh descriptor evidence, canonicalizes implicit local root endpoints before eligibility comparison, invalidates eligibility when configured credentials or implicit-provider endpoints change, isolates provider-local credential refresh failures, keeps unresolved command-backed credentials inactive, scopes command resolver cache entries by credential configuration generation, and fingerprints command-backed credential evidence for invalidation.

  • For configured OpenAI-compatible descriptor discovery, LM Studio discovery, and the OpenAI Completions/Responses transports, discovery and model identity retain the effective endpoint while requests construct the path before ordered query entries. This covers descriptor /models, LM Studio /v1/models, Completions /chat/completions, and Responses /responses, including repeated query parameters, configured query ordering before Azure defaults, query values ending in /, retries, query-free durable model-cache rows, and redacted diagnostics/request dumps.

Scope boundaries

Included: Q29 protocol/host/export plumbing, provider-eligibility evidence required by that contract (including existing descriptor-declared unauthenticated local providers), the minimal shared auth and OpenAI transport support for that evidence, generated SDK inventory/docs, and focused regressions.

Excluded: unrelated lifecycle, ACP, native shell, resource, profile, read-tool, and settings behavior changes. Existing provider families that are not changed by this PR are not refactored opportunistically.

Verification

  • bun test packages/coding-agent/test/sdk-operation-inventory.test.ts packages/coding-agent/test/model-registry.test.ts packages/coding-agent/test/sdk-q29-active-providers.test.ts packages/coding-agent/test/sdk-query-pagination.test.ts packages/coding-agent/test/sdk-operation-matrix.test.ts packages/coding-agent/test/sdk-host-wiring.test.ts packages/coding-agent/test/sdk-package-exports.test.ts packages/coding-agent/test/resolve-config-value.test.ts — 363 pass
  • bun test packages/ai/test/auth-storage-refresh-skew.test.ts packages/ai/test/openai-responses-system-prompt.test.ts packages/ai/test/openai-completions-compat.test.ts packages/ai/test/provider-fetch-override.test.ts — 67 pass
  • bun --cwd=packages/ai run check
  • bun --cwd=packages/coding-agent run check
  • git diff --check

@snowykr
snowykr force-pushed the feat/active-provider-public-sdk-q29 branch 3 times, most recently from 9ff4f12 to 8f5d4f7 Compare August 1, 2026 08:44

@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: 8f5d4f740c

ℹ️ 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 packages/coding-agent/src/config/model-registry.ts Outdated
@snowykr
snowykr force-pushed the feat/active-provider-public-sdk-q29 branch 2 times, most recently from e48edc8 to ef39cb3 Compare August 1, 2026 08:57

@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: ef39cb3b1a

ℹ️ 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 packages/coding-agent/src/config/model-registry.ts
@snowykr
snowykr force-pushed the feat/active-provider-public-sdk-q29 branch from ef39cb3 to 277d8c6 Compare August 1, 2026 09:08

@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: 277d8c6e33

ℹ️ 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 packages/coding-agent/src/config/model-registry.ts Outdated
@snowykr
snowykr force-pushed the feat/active-provider-public-sdk-q29 branch from 277d8c6 to 377e5d9 Compare August 1, 2026 09:17

@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: 377e5d98af

ℹ️ 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 packages/coding-agent/src/config/model-registry.ts Outdated
@snowykr
snowykr force-pushed the feat/active-provider-public-sdk-q29 branch 2 times, most recently from 6afdf5e to ddadd0e Compare August 1, 2026 09:43

@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: ddadd0e7d5

ℹ️ 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 packages/coding-agent/src/config/model-registry.ts
@snowykr
snowykr force-pushed the feat/active-provider-public-sdk-q29 branch 2 times, most recently from 5fcaade to 39aa8d5 Compare August 1, 2026 09:54

@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: 39aa8d54eb

ℹ️ 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 packages/coding-agent/src/config/model-registry.ts Outdated
@snowykr
snowykr force-pushed the feat/active-provider-public-sdk-q29 branch 2 times, most recently from 6d84c4e to 914f3a8 Compare August 1, 2026 10:10

@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: 914f3a8f06

ℹ️ 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 packages/coding-agent/src/config/model-registry.ts Outdated
@snowykr
snowykr force-pushed the feat/active-provider-public-sdk-q29 branch 3 times, most recently from 0e01dda to 91a94aa Compare August 1, 2026 10:25

@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: 91a94aa00a

ℹ️ 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 packages/coding-agent/src/config/model-registry.ts
@snowykr
snowykr force-pushed the feat/active-provider-public-sdk-q29 branch from 91a94aa to 11c50a9 Compare August 1, 2026 10:35

@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: 11c50a9fad

ℹ️ 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 packages/ai/src/providers/openai-completions.ts
@snowykr
snowykr force-pushed the feat/active-provider-public-sdk-q29 branch 2 times, most recently from 1f525bd to 238dec7 Compare August 1, 2026 10:45

@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: 238dec7044

ℹ️ 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 packages/coding-agent/src/config/model-registry.ts
@snowykr
snowykr force-pushed the feat/active-provider-public-sdk-q29 branch from 238dec7 to f4e8d14 Compare August 1, 2026 11:08
@snowykr
snowykr force-pushed the feat/active-provider-public-sdk-q29 branch 3 times, most recently from e9c4576 to ee0d69c Compare August 1, 2026 18:39

@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: ee0d69c934

ℹ️ 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 packages/ai/src/auth-storage.ts Outdated
@snowykr
snowykr force-pushed the feat/active-provider-public-sdk-q29 branch from ee0d69c to ad3db7f Compare August 1, 2026 18:50

@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: ad3db7fc9a

ℹ️ 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 packages/coding-agent/src/config/model-registry.ts Outdated
Comment thread packages/ai/src/auth-storage.ts
@snowykr
snowykr force-pushed the feat/active-provider-public-sdk-q29 branch 2 times, most recently from 6d53c0b to d93d194 Compare August 1, 2026 19:05

@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: d93d194ebe

ℹ️ 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 packages/ai/src/auth-storage.ts Outdated
@snowykr
snowykr force-pushed the feat/active-provider-public-sdk-q29 branch from d93d194 to ef0eb12 Compare August 1, 2026 19:25
@Yeachan-Heo
Yeachan-Heo force-pushed the feat/active-provider-public-sdk-q29 branch from ef0eb12 to ec12721 Compare August 1, 2026 19:37
@snowykr
snowykr force-pushed the feat/active-provider-public-sdk-q29 branch from ec12721 to 48f54ea Compare August 1, 2026 19:39
@Yeachan-Heo
Yeachan-Heo force-pushed the feat/active-provider-public-sdk-q29 branch from 48f54ea to 3327ab9 Compare August 1, 2026 19:41

@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: 3327ab90f4

ℹ️ 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 packages/ai/src/auth-storage.ts
@snowykr
snowykr force-pushed the feat/active-provider-public-sdk-q29 branch 2 times, most recently from 6eda1e4 to fd70566 Compare August 1, 2026 20:00

@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: fd70566e6b

ℹ️ 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 packages/coding-agent/src/config/model-registry.ts
@snowykr
snowykr force-pushed the feat/active-provider-public-sdk-q29 branch 3 times, most recently from 261f3b0 to 384bc12 Compare August 1, 2026 20:29

@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: 384bc12a2e

ℹ️ 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 packages/coding-agent/src/config/model-registry.ts
@snowykr
snowykr force-pushed the feat/active-provider-public-sdk-q29 branch 2 times, most recently from dc8649f to 2a3937d Compare August 1, 2026 20:43

@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: 2a3937d6bd

ℹ️ 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 packages/coding-agent/src/config/model-registry.ts Outdated
@snowykr
snowykr force-pushed the feat/active-provider-public-sdk-q29 branch from 2a3937d to b2dfbe0 Compare August 1, 2026 20:53

@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: b2dfbe05ba

ℹ️ 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 packages/coding-agent/src/config/model-registry.ts
Expose Q29 providers.list/active with non-secret descriptors, retained query snapshots, and credential-bound discovery eligibility.
@snowykr
snowykr force-pushed the feat/active-provider-public-sdk-q29 branch from b2dfbe0 to 07a25a2 Compare August 1, 2026 21:04
@snowykr

snowykr commented Aug 1, 2026

Copy link
Copy Markdown
Owner Author

Closed because the identical head 07a25a29 has merged upstream in Yeachan-Heo#3694.

@snowykr snowykr closed this Aug 1, 2026
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