Repository navigation
Description
Problem
Who is affected: members whose role isn't Owner, Admin or Developer, but who may use the API, either through a competence an Admin granted or because they still hold a personal key.
What they see: when either of their access reads fails, Settings › API shows an Access denied page instead of a failure:
Using API keys takes the Owner, Admin or Developer role, or a competence an Admin grants for one.
If only one read fails, a tab they may open is denied with "This page is for Owners, Admins and Developers." or the Models text instead.
Why it matters: the page states a verdict about their permissions that it never established, and it offers no Try again. A member who holds a key and wants to revoke it, for example after a leak, is told they may not open the page at all.
Cause
All paths below are at main d08251809.
services/platform/app/features/settings/model-endpoints/hooks/use-api-settings-access.ts:29-49:- It reads
useMyModelApiAccess(governance/queries:getMyModelApiAccess) anduseMyApiKeyAccess(governance/queries:getMyApiKeyAccess). - It keeps only
data?.allowed,data?.mayCreateanddata?.holdsKeys. loadingcoversisLoadingonly, so a failed read becomesfalseaccess once loading ends.
- It reads
services/platform/app/routes/dashboard/$id/settings/api/route.tsx:81-102:- after
access.loading,visibleItems.length === 0renders<AccessDenied message={tAccessDenied('apiKeys')} />; tabDeniedrendersapiTaborapiModels.- There is no error branch, and the access interface has no
errororrefetch.
- after
- Who isn't affected: Owners, Admins and Developers, because
developercomes from the ability, not from these reads. - History: the code dates from feat(platform): serve OpenAI- and Anthropic-compatible model endpoints #3812 and fix(platform): hold API-key creation to one rule, on the server #3941 (2026-09-29).
Expected
useApiSettingsAccessexposeserrorandretryfor the two reads.- When a read the member's access depends on has failed, the layout shows a short failure, such as "Your API access didn't load.", with Try again. It never shows Access denied.
- A partial failure keeps the tabs the successful read proves and names the failure for the rest.
Regression: route tests for a Member with a key grant, failing each read (500) in turn. They must show the failure with Try again, never accessDenied.apiKeys, apiTab or apiModels, and show the REST tab after a successful retry. Controls: a healthy grant shows REST, and a refused member still sees Access denied.
Severity and owner
- Severity: low to medium. It's a false permission verdict, and it blocks reaching your own key to revoke it during a degraded read. Nothing is exposed or granted.
- Owner: platform (settings and governance).
- Same class as: bug(platform): a failed project list read marks every Project budget rule "Deleted project" and says to remove it #4605 and bug(platform): a failed agent-list read makes a project's Default reviewer say its agent is unavailable #4644 (a failed read turned into a verdict), and bug(platform): API key owner pickers say no member, team or project qualifies while the list loads or after it fails to load #4586 and bug(platform): failed initial API-key list stays on its loading skeleton #3676 (failed API-key reads).
- Found by: Review A (TALE-358), 2026-10-11 04:15 Zurich occurrence, by static reading for the
api.indexUX-CLARITY cell. Not observed live, because the stack is blocked by the missing reservation.
Activity
yannickmonney commentedon Oct 12, 2026
Addendum (Review A, TALE-358, 2026-10-12 20:15 Zurich occurrence): the same failed access reads also hide the API entry from Settings navigation.
mainc94f1fd84, paths underservices/platform/app/features/settings/.model-endpoints/hooks/use-api-settings-access.ts:35-43decides access fromstanding.data?.allowed === trueandkeys.data?.mayCreate/holdsKeys === true, so a failed read counts as "no access", as this issue describes for the page.components/settings-rail.tsx:108-111) and hides the whole API group when none of the flags is true (:226, filtered at:270-279). The mobile settings list does the same (components/use-settings-menu-groups.ts:58-60,:147).Expected: while either grant read has failed, keep the entry, or show it with an error state, instead of treating the failure as no access.
This is static reading, verified at the cited lines. I didn't run it.