Skip to content

feat(cli): route AI example enhancement through FAI#16738

Open
kafkas wants to merge 4 commits into
mainfrom
anar/fer-11465-repoint-cli-ai-example-enhancement-to-fai
Open

feat(cli): route AI example enhancement through FAI#16738
kafkas wants to merge 4 commits into
mainfrom
anar/fer-11465-repoint-cli-ai-example-enhancement-to-fai

Conversation

@kafkas

@kafkas kafkas commented Jun 26, 2026

Copy link
Copy Markdown
Member

Description

Linear ticket: Closes FER-11465

Repoints CLI AI example enhancement from fdr-lambda-docs to the new FAI /examples/enhance endpoint.

This is the CLI-side follow-up to the FAI backend change. The CLI now sends enhancement requests to FAI in dev and prod, while preserving the existing payload shape, Venus JWT auth flow, retry behavior, timeout handling, and fallback-to-original-example behavior.

Changes Made

  • Renamed the AI example enhancement client from lambda terminology to FAI terminology (lambdaClient.ts -> faiClient.ts, LambdaExampleEnhancer -> FaiExampleEnhancer, DEFAULT_FDR_LAMBDA_DOCS_ORIGIN -> DEFAULT_FAI_ORIGIN).
  • Updated the enhancement request path from /v2/registry/ai/enhance-example to FAI's /examples/enhance.
  • Pointed dev CLI builds at https://fai-dev2.buildwithfern.com and prod CLI builds at https://fai.buildwithfern.com, matching each build's Venus environment.
  • Cleaned up obsolete lambda wording in logs, errors, comments, and tests.

Testing

  • Unit tests added/updated
  • Manual testing completed

Manual testing:

  • Rebuilt the dev CLI and published a test docs site using fai-dev2.
  • Rebuilt the prod CLI and published a test docs site using prod FAI.
  • Verified the CLI minted Venus JWTs, called FAI, generated enhanced examples, wrote ai_examples_override.yml, and published the docs site successfully.
  • Verified prod steady-state behavior with a second prod run: 7/7 endpoints enhanced on the first attempt, no retries/timeouts, and the site published successfully.

Open in Devin Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Open in Devin Review

Comment thread packages/cli/register/src/ai-example-enhancer/faiClient.ts
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