Skip to content

docs(ai-gateway): publish AI Gateway module reference#231

Open
sam-prais wants to merge 4 commits into
mainfrom
ai-gateway-docs
Open

docs(ai-gateway): publish AI Gateway module reference#231
sam-prais wants to merge 4 commits into
mainfrom
ai-gateway-docs

Conversation

@sam-prais

Copy link
Copy Markdown

Summary

  • The AI Gateway module (base44.aiGateway/base44.asServiceRole.aiGateway) had JSDoc from fix(ai-gateway): resolve gateway by app id in the path #226 but was never added to the docs pipeline whitelist, so it never appeared in the generated SDK reference.
  • Add AiGatewayModule and AiGatewayConnection to types-to-expose.json, and add AiGatewayConnection to types-to-delete-after-processing.json (same pattern as DeleteResult/ImportResult: keep it inline in the connection() method's Returns accordion, without a redundant standalone/appended section).
  • Rewrite the module JSDoc for reference quality:
    • Explain what an OpenAI-compatible client is inline (no external link needed).
    • Clarify the credit quota is shared across all app users, not per-user — if the app runs out of credits, the gateway stops working for everyone until reset.
    • Link to the current model alias list (InvokeLLM's model param) instead of hardcoding a list that will drift.
    • Split the growing intro into ## Models, ## Authentication Modes, and ## Billing and limits sections, matching the Agents/Auth/Functions module pages.
    • Added a second, simpler @example (plain OpenAI SDK call) ahead of the existing tool-loop agent example, per the "start simple" convention.

Test plan

  • npm test — 180/180 passing
  • npm run create-docs — verified the generated page has no duplicate AiGatewayConnection/Properties section and no stray standalone nav page
  • Previewed locally via mint dev against the paired mintlify-docs branch

The AI Gateway module's JSDoc was already updated in #226, but the types
were never added to the docs pipeline whitelist, so the module never
appeared in the generated SDK reference. Add AiGatewayModule and
AiGatewayConnection to the docs pipeline, and rewrite the JSDoc for
reference quality: explain what an OpenAI-compatible client is, clarify
that the credit quota is shared across all app users (not per-user),
link to the current model list, and split the growing intro into
Models / Authentication Modes / Billing and limits sections.
@claude

claude Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Claude encountered an error —— View job


I'll analyze this and get back to you.

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/sdk@0.8.39-pr.231.ef80ef9

Prefer not to change any import paths? Install using npm alias so your code still imports @base44/sdk:

npm i "@base44/sdk@npm:@base44-preview/sdk@0.8.39-pr.231.ef80ef9"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "@base44/sdk": "npm:@base44-preview/sdk@0.8.39-pr.231.ef80ef9"
  }
}

Preview published to npm registry — try new features instantly!

Comment thread src/modules/ai-gateway.types.ts Outdated
Comment thread src/modules/ai-gateway.types.ts
Correct the misleading security claim that calling from a backend
function keeps the token out of the browser — it's the same session
token already used for every other SDK call. The real reason to use
a backend function is code integrity: your instructions, tools, and
business logic stay server-side where you can enforce your own auth,
rate, and spend limits.

Also show where the base44 client comes from in both examples
(createClientFromRequest), instead of using a bare base44 with no
indication of its origin.
@claude

claude Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Claude encountered an error —— View job


I'll analyze this and get back to you.

Comment thread src/modules/ai-gateway.types.ts Outdated
claude_opus_4_8 is behind a feature flag and not open to users yet.
@claude

claude Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Claude encountered an error —— View job


I'll analyze this and get back to you.

Comment thread src/modules/ai-gateway.types.ts Outdated
Comment thread src/modules/ai-gateway.types.ts Outdated
Comment thread src/modules/ai-gateway.types.ts Outdated
Comment thread src/modules/ai-gateway.types.ts
Comment thread src/modules/ai-gateway.types.ts Outdated
…ple length

Tighten the backend-function rationale, merge the redundant Models
intro sentence into the model-options pointer, correct the
Authentication Modes section (no permission difference between
modes, just which token is returned), note that per-user usage
limits are left to the caller to build, and shorten both example
tab titles.
@claude

claude Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Claude encountered an error —— View job


I'll analyze this and get back to you.

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.

3 participants