<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/ship-production-ai-features-faster-with-firebase-ai-logic-hnnwp4ev3" -->

---
title: Ship production AI features faster with Firebase AI Logic
description: Firebase AI Logic gains several production-focused updates announced at Cloud Next &#x27;26: server prompt templates now support multi-turn chat and function...
canonical: https://daily.dev/posts/ship-production-ai-features-faster-with-firebase-ai-logic-hnnwp4ev3
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Ship production AI features faster with Firebase AI Logic | daily.dev
og:description: Firebase AI Logic gains several production-focused updates announced at Cloud Next &#x27;26: server prompt templates now support multi-turn chat and function...
og:url: https://daily.dev/posts/ship-production-ai-features-faster-with-firebase-ai-logic-hnnwp4ev3
og:image: https://api.daily.dev/og/posts/hNnwp4EV3.png
og:image:alt: Ship production AI features faster with Firebase AI Logic
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Ship production AI features faster with Firebase AI Logic

**[Firebase](https://daily.dev/sources/firebase-blog)** · 8 min read · 0 upvotes · 0 comments

## Summary

Firebase AI Logic gains several production-focused updates announced at Cloud Next '26: server prompt templates now support multi-turn chat and function calling, keeping system instructions and tool schemas entirely server-side. Starting May 2026, Firebase App Check adds replay attack protection, making tokens strictly single-use to prevent token interception abuse. New type-safe automatic function calling reduces boilerplate for Kotlin developers, explicit context caching cuts token costs for repeated large contexts, and hybrid on-device inference (previously Chrome-only) now comes to Android in experimental form, running on Gemini Nano when supported with automatic cloud fallback.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://firebase.blog/posts/2026/04/cloud-next-2026-ai-logic>

## Questions this post answers

### Does Firebase AI Logic support function calling in server prompt templates?

Yes, server prompt templates now support function calling as of the Cloud Next '26 update. Tool declarations, including name, description, typed parameters with constraints, and expected output, can be defined directly in the template frontmatter and stay on the server, never exposed to the client binary.

_Developers wiring up server-side AI tools can track Firebase AI Logic changes like this on daily.dev._

### What is replay attack protection in Firebase App Check and when does it launch?

Replay attack protection makes Firebase App Check tokens strictly single-use, starting May 2026. Each token is consumed on first use and rejected on subsequent attempts, so even if an attacker intercepts a valid token over the network, they cannot replay it, protecting AI endpoints where each call has a direct cost impact.

_Teams securing pay-per-call AI endpoints can follow App Check updates like this via daily.dev._

### How does hybrid on-device inference work for Android in Firebase AI Logic?

Setting the inference mode to PREFER_ON_DEVICE makes the SDK check whether the device supports Gemini Nano; if it does, inference runs locally with lower latency, full data privacy, and zero API cost, and if not, the SDK falls back to the cloud-hosted model automatically. This capability, previously available for Chrome web apps since October 2025, is now experimental on Android with a single codebase and no conditional logic required.

_Developers weighing on-device versus cloud inference tradeoffs can keep up with releases like this on daily.dev._

## Similar posts on daily.dev

- [Serverless AI for Android with Firebase AI Logic](https://daily.dev/posts/serverless-ai-for-android-with-firebase-ai-logic-33d7pefc4) · ProAndroidDev · 0 upvotes · 0 comments
- [Build intelligent Android apps: Cloud and hybrid inference](https://daily.dev/posts/build-intelligent-android-apps-cloud-and-hybrid-inference-eyctih4y9) · Android Developers Blog · 0 upvotes · 0 comments
- [Why You Should Never Embed Your Gemini API Key in Client Code \(And How Firebase AI Logic Fixes It\)](https://daily.dev/posts/why-you-should-never-embed-your-gemini-api-key-in-client-code-and-how-firebase-ai-logic-fixes-it--cnmlp8pk0) · freeCodeCamp · 0 upvotes · 0 comments

---

Tags: [#llm](https://daily.dev/tags/llm), [#firebase](https://daily.dev/tags/firebase), [#google-gemini](https://daily.dev/tags/google-gemini)

[View this post on daily.dev](https://daily.dev/posts/ship-production-ai-features-faster-with-firebase-ai-logic-hnnwp4ev3)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Ship production AI features faster with Firebase AI Logic","url":"https://daily.dev/posts/ship-production-ai-features-faster-with-firebase-ai-logic-hnnwp4ev3","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/ship-production-ai-features-faster-with-firebase-ai-logic-hnnwp4ev3"},"datePublished":"2026-08-23T12:18:16.730Z","dateModified":"2026-08-24T06:56:20.741Z","description":"Firebase AI Logic gains several production-focused updates announced at Cloud Next '26: server prompt templates now support multi-turn chat and function...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/55f594a792216a193945c9b2dc07a5fd?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/55f594a792216a193945c9b2dc07a5fd?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Firebase","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Firebase","logo":"https://media.daily.dev/image/upload/s--i395oqZH--/f_auto,q_auto/v1787487448/logos/firebase-blog?_a=BAMAMicg0","url":"https://daily.dev/sources/firebase-blog"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/ship-production-ai-features-faster-with-firebase-ai-logic-hnnwp4ev3","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"llm,firebase,google-gemini","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Firebase","item":"https://daily.dev/sources/firebase-blog"},{"@type":"ListItem","position":3,"name":"Ship production AI features faster with Firebase AI Logic"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/ship-production-ai-features-faster-with-firebase-ai-logic-hnnwp4ev3#faq","mainEntity":[{"@type":"Question","name":"Does Firebase AI Logic support function calling in server prompt templates?","acceptedAnswer":{"@type":"Answer","text":"Yes, server prompt templates now support function calling as of the Cloud Next '26 update. Tool declarations, including name, description, typed parameters with constraints, and expected output, can be defined directly in the template frontmatter and stay on the server, never exposed to the client binary. Developers wiring up server-side AI tools can track Firebase AI Logic changes like this on daily.dev."}},{"@type":"Question","name":"What is replay attack protection in Firebase App Check and when does it launch?","acceptedAnswer":{"@type":"Answer","text":"Replay attack protection makes Firebase App Check tokens strictly single-use, starting May 2026. Each token is consumed on first use and rejected on subsequent attempts, so even if an attacker intercepts a valid token over the network, they cannot replay it, protecting AI endpoints where each call has a direct cost impact. Teams securing pay-per-call AI endpoints can follow App Check updates like this via daily.dev."}},{"@type":"Question","name":"How does hybrid on-device inference work for Android in Firebase AI Logic?","acceptedAnswer":{"@type":"Answer","text":"Setting the inference mode to PREFER_ON_DEVICE makes the SDK check whether the device supports Gemini Nano; if it does, inference runs locally with lower latency, full data privacy, and zero API cost, and if not, the SDK falls back to the cloud-hosted model automatically. This capability, previously available for Chrome web apps since October 2025, is now experimental on Android with a single codebase and no conditional logic required. Developers weighing on-device versus cloud inference tradeoffs can keep up with releases like this on daily.dev."}}]}
```

