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: d4542c5

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 (1415f13)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/remote-config

    TypeBase (c47bd71)Merge (1415f13)Diff
    browser39.0 kB41.5 kB+2.47 kB (+6.3%)
    main40.2 kB42.7 kB+2.47 kB (+6.1%)
    module39.0 kB41.5 kB+2.47 kB (+6.3%)
  • bundle

    TypeBase (c47bd71)Merge (1415f13)Diff
    remote-config (getAndFetch)59.4 kB61.0 kB+1.58 kB (+2.7%)
  • firebase

    TypeBase (c47bd71)Merge (1415f13)Diff
    firebase-ai.js51.4 kB52.8 kB+1.44 kB (+2.8%)
    firebase-compat.js809 kB811 kB+1.50 kB (+0.2%)
    firebase-remote-config-compat.js38.7 kB40.2 kB+1.50 kB (+3.9%)
    firebase-remote-config.js43.5 kB45.1 kB+1.55 kB (+3.6%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/dFVBKRnp7q.html
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Oct 28, 2025

Size Analysis Report 1

This report is too large (101,900 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/zPOr68Oe0C.html
@dlarocque dlarocque requested a review from DellaBitta November 4, 2025 20:10
Co-authored-by: rachelsaunders <52258509+rachelsaunders@users.noreply.github.com>
@dlarocque dlarocque merged commit f06cbf9 into main Nov 12, 2025
36 of 38 checks passed
@dlarocque dlarocque deleted the dl/prompt-templates branch November 12, 2025 14:45
@google-oss-bot google-oss-bot mentioned this pull request Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants