Skip to content

Conversation

@dlarocque
Copy link
Contributor

Adds support for Server Prompt Templates. This feature allows developers to define and manage prompt on the server-side, which can then be executed from the client by referencing a template ID and providing variables.

API Changes: go/firebase-ai-server-prompt-template

Internal changes:

  • Request Parameter Object: The makeRequest function and RequestUrl constructor were refactored. Previously, they accepted a long list of individual arguments (model, task, apiSettings ,...), and were only able to make requests for model generation. This has been changed to a single configuration object which is either a ModelRequestURLParams or a TemplateRequestURLParams.
    • Easier to add configuration options without having to change the function signature
    • Allows us to make requests to URLs that aren't only for model generation.
  • Backend Pathing: The Backend abstract class and its implementations (VertexAIBackend, GoogleAIBackend) are now responsible for construction the request URL paths by implementing new methods _getTemplatePath and _getModelPath. This removes the need to have conditional logic in the request building logic if (backend is vertex ai) ... else ....

@dlarocque dlarocque requested review from a team as code owners October 28, 2025 14:30
@changeset-bot
Copy link

changeset-bot bot commented Oct 28, 2025

🦋 Changeset detected

Latest commit: 7e52134

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
firebase Minor
@firebase/ai Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Oct 28, 2025

Changeset File Check ✅

  • No modified packages are missing from the changeset file.
  • No changeset formatting errors detected.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Oct 28, 2025

Size Report 1

Affected Products

  • @firebase/ai

    TypeBase (c47bd71)Merge (ab73ddc)Diff
    browser65.4 kB67.4 kB+2.03 kB (+3.1%)
    main69.2 kB71.7 kB+2.49 kB (+3.6%)
    module65.4 kB67.4 kB+2.03 kB (+3.1%)
  • firebase

    TypeBase (c47bd71)Merge (ab73ddc)Diff
    firebase-ai.js51.4 kB52.8 kB+1.44 kB (+2.8%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/roKqgFvxvY.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Oct 28, 2025

Size Analysis Report 1

This report is too large (92,546 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/VSYidSg86Q.html

@dlarocque dlarocque requested a review from DellaBitta November 4, 2025 20:10
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