You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AI: add InterlinedApiClient.Ai.cs service + artifact models #9
Implemented in #137 — work continues in the PR from here.
Three things differed from this issue's sketch, and they matter for #10–#15. First, quota is not one shape: /status returns {usedToday, dailyLimit, remaining} but /suggest returns only {usedToday, dailyLimit} — no remaining — so AiQuota.Remaining is nullable and UI should bind RemainingOrComputed. Second, AI is Anthropic-only app-wide with no per-user provider keys (removed server-side 2026-09-05): the provider field on /generate is audit-ledger-only and the openai/gemini entries in defaultModels are unreachable, so there's no provider picker to build. Third, the code field is surfaced on a new AiApiException rather than on InterlinedApiException — the latter is sealed and is being rewritten in another open PR; folding the two together once that lands is noted as a follow-up in the code.
Also worth knowing: input-validation 422s cost no quota (verified — usedToday stayed 0 across two), but any call that reaches the model does, including one that fails, so the client pre-flights word caps / the 10-word series gate / missing powered_document source refs / non-persistable artifacts locally and never auto-retries. POST /api/ai/generate was deliberately never called (it writes to the shared test account), so its envelope is contract-transcribed and flagged unverified in the code.
Activity
Adron commentedon Sep 16, 2026
Implemented in #137 — work continues in the PR from here.
Three things differed from this issue's sketch, and they matter for #10–#15. First,
quotais not one shape:/statusreturns{usedToday, dailyLimit, remaining}but/suggestreturns only{usedToday, dailyLimit}— noremaining— soAiQuota.Remainingis nullable and UI should bindRemainingOrComputed. Second, AI is Anthropic-only app-wide with no per-user provider keys (removed server-side 2026-09-05): theproviderfield on/generateis audit-ledger-only and the openai/gemini entries indefaultModelsare unreachable, so there's no provider picker to build. Third, thecodefield is surfaced on a newAiApiExceptionrather than onInterlinedApiException— the latter issealedand is being rewritten in another open PR; folding the two together once that lands is noted as a follow-up in the code.Also worth knowing: input-validation 422s cost no quota (verified —
usedTodaystayed 0 across two), but any call that reaches the model does, including one that fails, so the client pre-flights word caps / the 10-word series gate / missing powered_document source refs / non-persistable artifacts locally and never auto-retries.POST /api/ai/generatewas deliberately never called (it writes to the shared test account), so its envelope is contract-transcribed and flagged unverified in the code.