Skip to content

Document AI client request configuration - #740

Open
PVillarmarzo wants to merge 2 commits into
masterfrom
pvill/ai-client-request-configuration
Open

Document AI client request configuration#740
PVillarmarzo wants to merge 2 commits into
masterfrom
pvill/ai-client-request-configuration

Conversation

@PVillarmarzo

Copy link
Copy Markdown
Contributor

Summary

Documents the request configuration options available in RevealSdkClient.initialize() for the AI Client SDK.

Changes

  • Added bearer-token authentication guidance using getBearerToken.
  • Added onRequest guidance for custom or dynamic request headers.

Why

These APIs are already supported by @revealbi/api, but were not documented in the public AI Client documentation.

@brianlagunas

Copy link
Copy Markdown
Member

These APIs weren't documented because they have not been finalized and verified

@zdrawku

zdrawku commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

@brianlagunas I checked the SDK source and both options are implemented now and behave exactly as this PR describes.

@PVillarmarzo, I have two review comments that I would want to be addressed before we merge this PR:

  1. Mention the static bearerToken option (and setBearerToken() for refresh) next to getBearerToken — documenting only the dynamic form is a partial picture.
  2. Consider a one-line note that onResponse / onError interceptors also exist, or explicitly scope them out.

@srodriguezinfragistics

Copy link
Copy Markdown
Contributor

Just chiming in, maybe we can publish this as a preview topic, as we did with IMetadataStorageProvider ?

That way we have docs about them without committing to the current API, which I believe is what Brian was referring to when mentioning the API isn't finalized.

Address review feedback on the request configuration docs.

- Move the content out of the SDK overview into a dedicated
  ai/sdk-request-configuration topic marked with
  sidebar_custom_props.status: preview, matching how the
  Metadata Storage Provider topic is published, plus an in-page
  preview note so the API shape is not presented as final.
- Document the static bearerToken option and setBearerToken(),
  and advise choosing one token strategy rather than describing
  how the two resolve against each other, which is not part of
  the stated API contract.
- Scope onResponse and onError explicitly, limited to what the
  public config types state.
- Keep the request-timing and SSE wording, and link the topic from
  the SDK overview and the client install page.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@PVillarmarzo

Copy link
Copy Markdown
Contributor Author

Thanks all.

@zdrawku both points are addressed: the Preview topic now covers bearerToken, setBearerToken(), and getBearerToken, and also explicitly mentions onResponse and onError.

@srodriguezinfragistics I followed the Preview approach you suggested and moved the request configuration content into its own topic, using the same convention as IMetadataStorageProvider.

@brianlagunas this should address the original concern about documenting APIs that aren't finalized yet; the functionality is now clearly presented as Preview rather than as part of the stable API surface.

I also kept the wording intentionally conservative and limited it to behavior supported by the public API contract, rather than documenting implementation-specific interactions.

@srodriguezinfragistics srodriguezinfragistics 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.

Publishing this as preview looks good to me.

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.

4 participants