Repository navigation
feat(kiro): live per-account model discovery via ListAvailableModels (Builder ID + IAM Identity Center) - #3836
Conversation
Kiro's model catalog is per-account/per-tier (free vs Pro vs Power) and, for AWS IAM Identity Center orgs, an admin-curated approved list. The provider models route returned only the static registry catalog for Kiro (source: local_catalog), so the list could not reflect what an account actually has. Add a Kiro branch to /api/providers/[id]/models that discovers the live catalog from the CodeWhisperer ListAvailableModels API (the same operation the Kiro IDE/CLI uses to populate its model picker): GET https://q.{region}.amazonaws.com/ListAvailableModels?origin=AI_EDITOR Authorization: Bearer <accessToken> Works for both simple (Builder ID / social) and IAM Identity Center accounts: - origin-only is the universal call (Builder ID / IdC) - region-matched endpoint with a us-east-1 fallback (IdC tokens are region-bound) - profileArn is only retried for desktop-style accounts that have one (sending it for Builder ID can 403) Uses the stored OAuth access token (kept fresh + persisted by the chat executor's refreshCredentials); never refreshes here to avoid rotating/invalidating the stored refresh token. Falls back to the static registry catalog when the token is missing/expired or the upstream is unavailable, so model import never breaks. Adds open-sse/services/kiroModels.ts (parse/region/endpoint/fetch helpers) and unit tests covering Builder ID, IdC region routing, profileArn retry, and fallbacks.
There was a problem hiding this comment.
Code Review
This pull request implements live model discovery for the Kiro (AWS CodeWhisperer / Amazon Q) provider by querying the ListAvailableModels API, with a fallback to the static catalog when unauthenticated or offline. It adds the kiroModels.ts service, integrates it into the provider models API route, and includes comprehensive unit tests. The feedback recommends enhancing the AWS region resolution regex to support non-standard AWS partitions (such as aws-cn and aws-us-gov) and adding corresponding test coverage for these partitions.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| const fromArn = profileArn | ||
| ? profileArn.toLowerCase().match(/^arn:aws:codewhisperer:([a-z0-9-]+):/)?.[1] | ||
| : undefined; |
There was a problem hiding this comment.
The regular expression strictly expects the standard aws partition (arn:aws:codewhisperer:). If a user is using Amazon Q / CodeWhisperer in other AWS partitions (such as aws-cn in China or aws-us-gov in GovCloud), the partition name will differ (e.g., arn:aws-cn:codewhisperer:), causing the region extraction to fail and fall back to us-east-1. Updating the regex to support other partitions makes the region resolution more robust.
| const fromArn = profileArn | |
| ? profileArn.toLowerCase().match(/^arn:aws:codewhisperer:([a-z0-9-]+):/)?.[1] | |
| : undefined; | |
| const fromArn = profileArn | |
| ? profileArn.toLowerCase().match(/^arn:aws[a-z0-9-]*:codewhisperer:([a-z0-9-]+):/)?.[1] | |
| : undefined; |
| assert.equal( | ||
| resolveKiroRegion({ profileArn: "arn:aws:codewhisperer:eu-central-1:123:profile/X" }), | ||
| "eu-central-1" | ||
| ); |
There was a problem hiding this comment.
Add a test case to verify that region resolution works correctly for non-standard AWS partitions (such as aws-cn).
assert.equal(
resolveKiroRegion({ profileArn: "arn:aws:codewhisperer:eu-central-1:123:profile/X" }),
"eu-central-1"
);
assert.equal(
resolveKiroRegion({ profileArn: "arn:aws-cn:codewhisperer:cn-north-1:123:profile/X" }),
"cn-north-1"
);…ynamic-model-discovery
…aper-inference#3836) models/route.ts 2426→2487 (+61: kiro ListAvailableModels discovery branch). Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com>
948cf1f
into
cheaper-inference:release/v3.8.25
|
Merged into |
…ributors Audited every commit since v3.8.24 and filled the gaps the [3.8.25] section was missing: a New Features section (compression engines + Compression Studios #3848, compression UI #3860, injection-guard #3857, kiro discovery #3836, Veo #3839, mimocode proxy #3837, Arena ELO flag #3821), 9 more Fixed entries (#3811/#3807/#3759/#3849/#3838/#3835/#3814/#3820/#3819), a Security section (CCR IDOR #3859, supply-chain #3824), and an Internal/Quality section. Every contributor and issue reporter is now credited.
* chore(release): continue v3.8.25 development cycle after main code-sync (r5) main fast-forwarded to release/v3.8.25 (#3863): unblocked Build+Docker via #3864, plus #3837 (mimocode proxy) and #3862 (trivy bump). This marker re-opens the umbrella PR for further v3.8.25 work. No version bump. * fix(db): persist the Keep-latest-backups retention setting (#3834) (#3867) * fix(oauth): clear GitLab Duo setup message instead of 500 (#3861) (#3868) * test(oauth): prove refresh_token preserved on real gemini-cli/antigravity dispatch (#3850) (#3869) * feat(compression-ui): unified compression config UI — per-engine pages + combos editor + menu + WS default-on (#3860) Integrated into release/v3.8.25 — feat(compression-ui): unified compression configuration UI (Compression Hub + per-engine Lite/Aggressive/Ultra pages + combos editor + sidebar entry + live-WS default-on). File-size re-baselined for sidebarVisibility.ts/chatCore.ts growth; orphan ws test relocated to a collected path. * docs(changelog): complete the v3.8.25 release notes + credit all contributors Audited every commit since v3.8.24 and filled the gaps the [3.8.25] section was missing: a New Features section (compression engines + Compression Studios #3848, compression UI #3860, injection-guard #3857, kiro discovery #3836, Veo #3839, mimocode proxy #3837, Arena ELO flag #3821), 9 more Fixed entries (#3811/#3807/#3759/#3849/#3838/#3835/#3814/#3820/#3819), a Security section (CCR IDOR #3859, supply-chain #3824), and an Internal/Quality section. Every contributor and issue reporter is now credited. * docs(changelog): restore + complete the v3.8.25 release notes Re-adds CHANGELOG.md (a prior server-side commit accidentally dropped it) with the complete, audited [3.8.25] section: New Features, the full Fixed list, Security & Hardening, and Internal/Quality — every contributor and issue reporter credited. * chore(release): finalize v3.8.25 — reconcile CHANGELOG + i18n mirrors, document OMNIROUTE_MAX_PENDING_MIGRATIONS, green the unit suite Release-gate reconciliation for v3.8.25: - CHANGELOG: dated 2026-06-14, linked #3826, rolled up file-size re-baselines (#3823/#3833), recorded the test-greening; re-synced all 41 i18n CHANGELOG mirrors. - Documented OMNIROUTE_MAX_PENDING_MIGRATIONS (#3416) in .env.example + ENVIRONMENT.md. - Greened the unit suite (was merged red on 4 CI shards): aligned 10 stale tests to this cycle's intended behavior (#3838/#3822/#3501/SOCKS5/Vertex-Express/Antigravity) and the same-provider 503 fall-through test; de-flaked the compression benchmark reproducibility and ServiceSupervisor crash tests. No production code changed. * ci(security): clear OpenSSF Scorecard code-scanning noise + harden workflow token permissions The Security tab held 155 open alerts, ALL from the advisory OpenSSF Scorecard tool (#3824) — supply-chain/posture scores, not code vulnerabilities — which drowned out real CodeQL findings. - scorecard.yml: stop uploading SARIF to the code-scanning tab (drop the upload-sarif step + the now-unused security-events: write). The run still produces the OpenSSF badge (publish_results) and a downloadable SARIF artifact. - TokenPermissions hardening (the high-severity, genuinely-valuable subset): set each workflow's top-level token to read-only and grant the exact writes at the job level that needs them — npm-publish (id-token/packages on publish jobs), docker-publish (packages on build), electron-release (contents on build/release, id-token/packages on publish-npm), build-fork (packages on build), claude (empty top-level; job grants its own). The 155 existing alerts were dismissed. Not adopting repo-wide SHA-pinning (143 PinnedDependencies advisories) — declined. * test(integration): align stale wiring/socks5 integration tests to this cycle's behavior These were red on the CI Integration job (pre-existing). No production code changed: - integration-wiring: the combos page no longer renders a per-page EmailPrivacyToggle (#3822 consolidated it into Settings → Appearance); the provider-detail test-result masking and upstream-proxy copy moved to decomposed components (#3501 BatchTestResultsModal / UpstreamProxyCard) — assertions now read the owning files. - api-routes-critical: SOCKS5 is now enabled by default (opt-out), so the disabled- rejection test must set ENABLE_SOCKS5_PROXY=false explicitly (an unset env now means enabled). (The ~32 live-Gemini integration tests are gated on OMNIROUTE_API_KEY and skip in CI; they only 'fail' locally when that key is present without a running server.)
…heaper-inference#3836) Kiro's catalog is per-account / per-tier (and admin-curated for IAM Identity Center orgs), which the static registry can't reflect. The models route now discovers the live list from the CodeWhisperer ListAvailableModels API with the stored OAuth token (Builder ID / social and IdC accounts; profileArn only as a retry to avoid 403, region-matched with us-east-1 fallback), falling back to the static registry catalog when the token is missing/expired or the upstream is unavailable so import never breaks. Integrated into release/v3.8.25. Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com>
* chore(release): continue v3.8.25 development cycle after main code-sync (r5) main fast-forwarded to release/v3.8.25 (cheaper-inference#3863): unblocked Build+Docker via cheaper-inference#3864, plus cheaper-inference#3837 (mimocode proxy) and cheaper-inference#3862 (trivy bump). This marker re-opens the umbrella PR for further v3.8.25 work. No version bump. * fix(db): persist the Keep-latest-backups retention setting (cheaper-inference#3834) (cheaper-inference#3867) * fix(oauth): clear GitLab Duo setup message instead of 500 (cheaper-inference#3861) (cheaper-inference#3868) * test(oauth): prove refresh_token preserved on real gemini-cli/antigravity dispatch (cheaper-inference#3850) (cheaper-inference#3869) * feat(compression-ui): unified compression config UI — per-engine pages + combos editor + menu + WS default-on (cheaper-inference#3860) Integrated into release/v3.8.25 — feat(compression-ui): unified compression configuration UI (Compression Hub + per-engine Lite/Aggressive/Ultra pages + combos editor + sidebar entry + live-WS default-on). File-size re-baselined for sidebarVisibility.ts/chatCore.ts growth; orphan ws test relocated to a collected path. * docs(changelog): complete the v3.8.25 release notes + credit all contributors Audited every commit since v3.8.24 and filled the gaps the [3.8.25] section was missing: a New Features section (compression engines + Compression Studios cheaper-inference#3848, compression UI cheaper-inference#3860, injection-guard cheaper-inference#3857, kiro discovery cheaper-inference#3836, Veo cheaper-inference#3839, mimocode proxy cheaper-inference#3837, Arena ELO flag cheaper-inference#3821), 9 more Fixed entries (cheaper-inference#3811/cheaper-inference#3807/cheaper-inference#3759/cheaper-inference#3849/cheaper-inference#3838/cheaper-inference#3835/cheaper-inference#3814/cheaper-inference#3820/cheaper-inference#3819), a Security section (CCR IDOR cheaper-inference#3859, supply-chain cheaper-inference#3824), and an Internal/Quality section. Every contributor and issue reporter is now credited. * docs(changelog): restore + complete the v3.8.25 release notes Re-adds CHANGELOG.md (a prior server-side commit accidentally dropped it) with the complete, audited [3.8.25] section: New Features, the full Fixed list, Security & Hardening, and Internal/Quality — every contributor and issue reporter credited. * chore(release): finalize v3.8.25 — reconcile CHANGELOG + i18n mirrors, document OMNIROUTE_MAX_PENDING_MIGRATIONS, green the unit suite Release-gate reconciliation for v3.8.25: - CHANGELOG: dated 2026-06-14, linked cheaper-inference#3826, rolled up file-size re-baselines (cheaper-inference#3823/cheaper-inference#3833), recorded the test-greening; re-synced all 41 i18n CHANGELOG mirrors. - Documented OMNIROUTE_MAX_PENDING_MIGRATIONS (cheaper-inference#3416) in .env.example + ENVIRONMENT.md. - Greened the unit suite (was merged red on 4 CI shards): aligned 10 stale tests to this cycle's intended behavior (cheaper-inference#3838/cheaper-inference#3822/cheaper-inference#3501/SOCKS5/Vertex-Express/Antigravity) and the same-provider 503 fall-through test; de-flaked the compression benchmark reproducibility and ServiceSupervisor crash tests. No production code changed. * ci(security): clear OpenSSF Scorecard code-scanning noise + harden workflow token permissions The Security tab held 155 open alerts, ALL from the advisory OpenSSF Scorecard tool (cheaper-inference#3824) — supply-chain/posture scores, not code vulnerabilities — which drowned out real CodeQL findings. - scorecard.yml: stop uploading SARIF to the code-scanning tab (drop the upload-sarif step + the now-unused security-events: write). The run still produces the OpenSSF badge (publish_results) and a downloadable SARIF artifact. - TokenPermissions hardening (the high-severity, genuinely-valuable subset): set each workflow's top-level token to read-only and grant the exact writes at the job level that needs them — npm-publish (id-token/packages on publish jobs), docker-publish (packages on build), electron-release (contents on build/release, id-token/packages on publish-npm), build-fork (packages on build), claude (empty top-level; job grants its own). The 155 existing alerts were dismissed. Not adopting repo-wide SHA-pinning (143 PinnedDependencies advisories) — declined. * test(integration): align stale wiring/socks5 integration tests to this cycle's behavior These were red on the CI Integration job (pre-existing). No production code changed: - integration-wiring: the combos page no longer renders a per-page EmailPrivacyToggle (cheaper-inference#3822 consolidated it into Settings → Appearance); the provider-detail test-result masking and upstream-proxy copy moved to decomposed components (cheaper-inference#3501 BatchTestResultsModal / UpstreamProxyCard) — assertions now read the owning files. - api-routes-critical: SOCKS5 is now enabled by default (opt-out), so the disabled- rejection test must set ENABLE_SOCKS5_PROXY=false explicitly (an unset env now means enabled). (The ~32 live-Gemini integration tests are gated on OMNIROUTE_API_KEY and skip in CI; they only 'fail' locally when that key is present without a running server.)
…heaper-inference#3836) Kiro's catalog is per-account / per-tier (and admin-curated for IAM Identity Center orgs), which the static registry can't reflect. The models route now discovers the live list from the CodeWhisperer ListAvailableModels API with the stored OAuth token (Builder ID / social and IdC accounts; profileArn only as a retry to avoid 403, region-matched with us-east-1 fallback), falling back to the static registry catalog when the token is missing/expired or the upstream is unavailable so import never breaks. Integrated into release/v3.8.25. Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com>
* chore(release): continue v3.8.25 development cycle after main code-sync (r5) main fast-forwarded to release/v3.8.25 (cheaper-inference#3863): unblocked Build+Docker via cheaper-inference#3864, plus cheaper-inference#3837 (mimocode proxy) and cheaper-inference#3862 (trivy bump). This marker re-opens the umbrella PR for further v3.8.25 work. No version bump. * fix(db): persist the Keep-latest-backups retention setting (cheaper-inference#3834) (cheaper-inference#3867) * fix(oauth): clear GitLab Duo setup message instead of 500 (cheaper-inference#3861) (cheaper-inference#3868) * test(oauth): prove refresh_token preserved on real gemini-cli/antigravity dispatch (cheaper-inference#3850) (cheaper-inference#3869) * feat(compression-ui): unified compression config UI — per-engine pages + combos editor + menu + WS default-on (cheaper-inference#3860) Integrated into release/v3.8.25 — feat(compression-ui): unified compression configuration UI (Compression Hub + per-engine Lite/Aggressive/Ultra pages + combos editor + sidebar entry + live-WS default-on). File-size re-baselined for sidebarVisibility.ts/chatCore.ts growth; orphan ws test relocated to a collected path. * docs(changelog): complete the v3.8.25 release notes + credit all contributors Audited every commit since v3.8.24 and filled the gaps the [3.8.25] section was missing: a New Features section (compression engines + Compression Studios cheaper-inference#3848, compression UI cheaper-inference#3860, injection-guard cheaper-inference#3857, kiro discovery cheaper-inference#3836, Veo cheaper-inference#3839, mimocode proxy cheaper-inference#3837, Arena ELO flag cheaper-inference#3821), 9 more Fixed entries (cheaper-inference#3811/cheaper-inference#3807/cheaper-inference#3759/cheaper-inference#3849/cheaper-inference#3838/cheaper-inference#3835/cheaper-inference#3814/cheaper-inference#3820/cheaper-inference#3819), a Security section (CCR IDOR cheaper-inference#3859, supply-chain cheaper-inference#3824), and an Internal/Quality section. Every contributor and issue reporter is now credited. * docs(changelog): restore + complete the v3.8.25 release notes Re-adds CHANGELOG.md (a prior server-side commit accidentally dropped it) with the complete, audited [3.8.25] section: New Features, the full Fixed list, Security & Hardening, and Internal/Quality — every contributor and issue reporter credited. * chore(release): finalize v3.8.25 — reconcile CHANGELOG + i18n mirrors, document OMNIROUTE_MAX_PENDING_MIGRATIONS, green the unit suite Release-gate reconciliation for v3.8.25: - CHANGELOG: dated 2026-06-14, linked cheaper-inference#3826, rolled up file-size re-baselines (cheaper-inference#3823/cheaper-inference#3833), recorded the test-greening; re-synced all 41 i18n CHANGELOG mirrors. - Documented OMNIROUTE_MAX_PENDING_MIGRATIONS (cheaper-inference#3416) in .env.example + ENVIRONMENT.md. - Greened the unit suite (was merged red on 4 CI shards): aligned 10 stale tests to this cycle's intended behavior (cheaper-inference#3838/cheaper-inference#3822/cheaper-inference#3501/SOCKS5/Vertex-Express/Antigravity) and the same-provider 503 fall-through test; de-flaked the compression benchmark reproducibility and ServiceSupervisor crash tests. No production code changed. * ci(security): clear OpenSSF Scorecard code-scanning noise + harden workflow token permissions The Security tab held 155 open alerts, ALL from the advisory OpenSSF Scorecard tool (cheaper-inference#3824) — supply-chain/posture scores, not code vulnerabilities — which drowned out real CodeQL findings. - scorecard.yml: stop uploading SARIF to the code-scanning tab (drop the upload-sarif step + the now-unused security-events: write). The run still produces the OpenSSF badge (publish_results) and a downloadable SARIF artifact. - TokenPermissions hardening (the high-severity, genuinely-valuable subset): set each workflow's top-level token to read-only and grant the exact writes at the job level that needs them — npm-publish (id-token/packages on publish jobs), docker-publish (packages on build), electron-release (contents on build/release, id-token/packages on publish-npm), build-fork (packages on build), claude (empty top-level; job grants its own). The 155 existing alerts were dismissed. Not adopting repo-wide SHA-pinning (143 PinnedDependencies advisories) — declined. * test(integration): align stale wiring/socks5 integration tests to this cycle's behavior These were red on the CI Integration job (pre-existing). No production code changed: - integration-wiring: the combos page no longer renders a per-page EmailPrivacyToggle (cheaper-inference#3822 consolidated it into Settings → Appearance); the provider-detail test-result masking and upstream-proxy copy moved to decomposed components (cheaper-inference#3501 BatchTestResultsModal / UpstreamProxyCard) — assertions now read the owning files. - api-routes-critical: SOCKS5 is now enabled by default (opt-out), so the disabled- rejection test must set ENABLE_SOCKS5_PROXY=false explicitly (an unset env now means enabled). (The ~32 live-Gemini integration tests are gated on OMNIROUTE_API_KEY and skip in CI; they only 'fail' locally when that key is present without a running server.)
…ributors Audited every commit since v3.8.24 and filled the gaps the [3.8.25] section was missing: a New Features section (compression engines + Compression Studios cheaper-inference#3848, compression UI cheaper-inference#3860, injection-guard cheaper-inference#3857, kiro discovery cheaper-inference#3836, Veo cheaper-inference#3839, mimocode proxy cheaper-inference#3837, Arena ELO flag cheaper-inference#3821), 9 more Fixed entries (cheaper-inference#3811/cheaper-inference#3807/cheaper-inference#3759/cheaper-inference#3849/cheaper-inference#3838/cheaper-inference#3835/cheaper-inference#3814/cheaper-inference#3820/cheaper-inference#3819), a Security section (CCR IDOR cheaper-inference#3859, supply-chain cheaper-inference#3824), and an Internal/Quality section. Every contributor and issue reporter is now credited.
…heaper-inference#3836) Kiro's catalog is per-account / per-tier (and admin-curated for IAM Identity Center orgs), which the static registry can't reflect. The models route now discovers the live list from the CodeWhisperer ListAvailableModels API with the stored OAuth token (Builder ID / social and IdC accounts; profileArn only as a retry to avoid 403, region-matched with us-east-1 fallback), falling back to the static registry catalog when the token is missing/expired or the upstream is unavailable so import never breaks. Integrated into release/v3.8.25. Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com>
* chore(release): continue v3.8.25 development cycle after main code-sync (r5) main fast-forwarded to release/v3.8.25 (cheaper-inference#3863): unblocked Build+Docker via cheaper-inference#3864, plus cheaper-inference#3837 (mimocode proxy) and cheaper-inference#3862 (trivy bump). This marker re-opens the umbrella PR for further v3.8.25 work. No version bump. * fix(db): persist the Keep-latest-backups retention setting (cheaper-inference#3834) (cheaper-inference#3867) * fix(oauth): clear GitLab Duo setup message instead of 500 (cheaper-inference#3861) (cheaper-inference#3868) * test(oauth): prove refresh_token preserved on real gemini-cli/antigravity dispatch (cheaper-inference#3850) (cheaper-inference#3869) * feat(compression-ui): unified compression config UI — per-engine pages + combos editor + menu + WS default-on (cheaper-inference#3860) Integrated into release/v3.8.25 — feat(compression-ui): unified compression configuration UI (Compression Hub + per-engine Lite/Aggressive/Ultra pages + combos editor + sidebar entry + live-WS default-on). File-size re-baselined for sidebarVisibility.ts/chatCore.ts growth; orphan ws test relocated to a collected path. * docs(changelog): complete the v3.8.25 release notes + credit all contributors Audited every commit since v3.8.24 and filled the gaps the [3.8.25] section was missing: a New Features section (compression engines + Compression Studios cheaper-inference#3848, compression UI cheaper-inference#3860, injection-guard cheaper-inference#3857, kiro discovery cheaper-inference#3836, Veo cheaper-inference#3839, mimocode proxy cheaper-inference#3837, Arena ELO flag cheaper-inference#3821), 9 more Fixed entries (cheaper-inference#3811/cheaper-inference#3807/cheaper-inference#3759/cheaper-inference#3849/cheaper-inference#3838/cheaper-inference#3835/cheaper-inference#3814/cheaper-inference#3820/cheaper-inference#3819), a Security section (CCR IDOR cheaper-inference#3859, supply-chain cheaper-inference#3824), and an Internal/Quality section. Every contributor and issue reporter is now credited. * docs(changelog): restore + complete the v3.8.25 release notes Re-adds CHANGELOG.md (a prior server-side commit accidentally dropped it) with the complete, audited [3.8.25] section: New Features, the full Fixed list, Security & Hardening, and Internal/Quality — every contributor and issue reporter credited. * chore(release): finalize v3.8.25 — reconcile CHANGELOG + i18n mirrors, document OMNIROUTE_MAX_PENDING_MIGRATIONS, green the unit suite Release-gate reconciliation for v3.8.25: - CHANGELOG: dated 2026-06-14, linked cheaper-inference#3826, rolled up file-size re-baselines (cheaper-inference#3823/cheaper-inference#3833), recorded the test-greening; re-synced all 41 i18n CHANGELOG mirrors. - Documented OMNIROUTE_MAX_PENDING_MIGRATIONS (cheaper-inference#3416) in .env.example + ENVIRONMENT.md. - Greened the unit suite (was merged red on 4 CI shards): aligned 10 stale tests to this cycle's intended behavior (cheaper-inference#3838/cheaper-inference#3822/cheaper-inference#3501/SOCKS5/Vertex-Express/Antigravity) and the same-provider 503 fall-through test; de-flaked the compression benchmark reproducibility and ServiceSupervisor crash tests. No production code changed. * ci(security): clear OpenSSF Scorecard code-scanning noise + harden workflow token permissions The Security tab held 155 open alerts, ALL from the advisory OpenSSF Scorecard tool (cheaper-inference#3824) — supply-chain/posture scores, not code vulnerabilities — which drowned out real CodeQL findings. - scorecard.yml: stop uploading SARIF to the code-scanning tab (drop the upload-sarif step + the now-unused security-events: write). The run still produces the OpenSSF badge (publish_results) and a downloadable SARIF artifact. - TokenPermissions hardening (the high-severity, genuinely-valuable subset): set each workflow's top-level token to read-only and grant the exact writes at the job level that needs them — npm-publish (id-token/packages on publish jobs), docker-publish (packages on build), electron-release (contents on build/release, id-token/packages on publish-npm), build-fork (packages on build), claude (empty top-level; job grants its own). The 155 existing alerts were dismissed. Not adopting repo-wide SHA-pinning (143 PinnedDependencies advisories) — declined. * test(integration): align stale wiring/socks5 integration tests to this cycle's behavior These were red on the CI Integration job (pre-existing). No production code changed: - integration-wiring: the combos page no longer renders a per-page EmailPrivacyToggle (cheaper-inference#3822 consolidated it into Settings → Appearance); the provider-detail test-result masking and upstream-proxy copy moved to decomposed components (cheaper-inference#3501 BatchTestResultsModal / UpstreamProxyCard) — assertions now read the owning files. - api-routes-critical: SOCKS5 is now enabled by default (opt-out), so the disabled- rejection test must set ENABLE_SOCKS5_PROXY=false explicitly (an unset env now means enabled). (The ~32 live-Gemini integration tests are gated on OMNIROUTE_API_KEY and skip in CI; they only 'fail' locally when that key is present without a running server.)
Summary
Kiro's model catalog is per-account / per-tier — free vs Pro vs Pro+ vs Power expose different models, and AWS IAM Identity Center (enterprise) orgs further restrict it to an admin-curated "approved models" list. But the provider models route returned only the static registry catalog for Kiro (
source: "local_catalog"), so the list could never reflect what a given account actually has access to (and couldn't pick up newly released Kiro models without a registry update).This adds live model discovery for Kiro using the same
ListAvailableModelsoperation the Kiro IDE/CLI uses to populate its model picker.How
GET https://q.{region}.amazonaws.com/ListAvailableModels?origin=AI_EDITORwithAuthorization: Bearer <accessToken>, returning{ models: [{ modelId, modelName?, tokenLimits? }] }.Designed to work for both account types:
origin=AI_EDITORalone, onq.us-east-1.eu-central-1) with aus-east-1fallback.profileArnis only sent as a retry for desktop-style accounts that have one — it's omitted by default because sending it for Builder ID can return 403.Token handling:
refreshCredentials). It deliberately does not refresh here, to avoid rotating/invalidating the stored refresh token.Changes
open-sse/services/kiroModels.ts(new):parseKiroModels,resolveKiroRegion,buildKiroModelsEndpoints,fetchKiroAvailableModels.src/app/api/providers/[id]/models/route.ts: aprovider === "kiro"discovery branch mirroring the existing GitHub Copilot / Antigravity branches (cache → auto-fetch gate → live discovery → static fallback).tests/unit/kiro-available-models.test.ts(new): parsing, region routing, Builder ID vs IdC endpoint selection, profileArn retry, and both fallback paths.Testing