Commit ebfa5e4
authored
add imagen deprecaton notice (#7988)
## Summary
This PR marks all classes and public methods starting with `Imagen` as
deprecated in the `ai-logic/firebase-ai` module. This is in preparation
for the planned shutdown of Imagen models in June 2026. Developers are
encouraged to migrate to Gemini Image models.
## Changes Made
### 1. Class-Level Deprecation
Added standard deprecation notices to the KDoc of all identified
`Imagen*` classes and interfaces. The notice reads:
> `@deprecated **Deprecation Notice:** All Imagen models are deprecated
and will shut down as early as June 2026. As a replacement, you can
[migrate your apps to use Gemini Image models (the 'Nano Banana'
models)](https://firebase.google.com/docs/ai-logic/imagen-models-migration)`
Updated files:
- `ImagenModel.kt`
- `ImagenEditMode.kt`
- `ImagenEditingConfig.kt`
- `ImagenImagePlacement.kt`
- `ImagenPersonFilterLevel.kt`
- `ImagenMaskMode.kt`
- `ImagenReferenceImage.kt`
- `ImagenMaskConfig.kt`
- `ImagenGCSImage.kt`
- `ImagenSubjectConfig.kt`
- `ImagenGenerationResponse.kt`
- `ImagenSubjectReferenceType.kt`
- `ImagenControlType.kt`
- `ImagenInlineImage.kt`
- `ImagenAspectRatio.kt`
- `ImagenImageFormat.kt`
- `ImagenGenerationConfig.kt`
- `ImagenSafetyFilterLevel.kt`
- `ImagenStyleConfig.kt`
- `ImagenSafetySettings.kt`
- `ImagenControlConfig.kt`
- `ImagenModelFutures.kt`
- `Request.kt` (Internal request classes `ImagenPrompt` and
`ImagenParameters`)
### 2. Method-Level Deprecation
Added the notice to public methods and helper functions within those
files to ensure developers are notified when using specific features:
- `ImagenInlineImage.kt` (`asBitmap`, `toImagenInlineImage`)
- `ImagenImagePlacement.kt` (`fromCoordinate`)
- `ImagenModelFutures.kt` (`generateImages`, `editImage`,
`inpaintImage`, `outpaintImage`, `getImageModel`, `from`)
- `ImagenImageFormat.kt` (`jpeg`, `png`)
- `ImagenGenerationConfig.kt` (`Builder` setters, `build`,
`imagenGenerationConfig`)
- `ImagenReferenceImage.kt` (`generateMaskAndPadForOutpainting`)
### 3. Verification
- Code formatted successfully with `./gradlew
:ai-logic:firebase-ai:spotlessApply`.1 parent b77cdc3 commit ebfa5e4
17 files changed
Lines changed: 307 additions & 18 deletions
File tree
- ai-logic/firebase-ai
- src/main/kotlin/com/google/firebase/ai
- java
- type
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
6 | | - | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
47 | 51 | | |
| 52 | + | |
48 | 53 | | |
49 | 54 | | |
50 | 55 | | |
| |||
86 | 91 | | |
87 | 92 | | |
88 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
89 | 98 | | |
| 99 | + | |
90 | 100 | | |
91 | 101 | | |
92 | 102 | | |
| |||
104 | 114 | | |
105 | 115 | | |
106 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
107 | 121 | | |
| 122 | + | |
108 | 123 | | |
109 | 124 | | |
110 | 125 | | |
| |||
129 | 144 | | |
130 | 145 | | |
131 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
132 | 151 | | |
| 152 | + | |
133 | 153 | | |
134 | 154 | | |
135 | 155 | | |
| |||
154 | 174 | | |
155 | 175 | | |
156 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
157 | 181 | | |
| 182 | + | |
158 | 183 | | |
159 | 184 | | |
160 | 185 | | |
| |||
Lines changed: 48 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
36 | 40 | | |
| 41 | + | |
37 | 42 | | |
38 | 43 | | |
39 | 44 | | |
40 | 45 | | |
41 | 46 | | |
42 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
43 | 52 | | |
| 53 | + | |
44 | 54 | | |
45 | 55 | | |
46 | 56 | | |
| |||
52 | 62 | | |
53 | 63 | | |
54 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
55 | 69 | | |
| 70 | + | |
56 | 71 | | |
57 | 72 | | |
58 | 73 | | |
| |||
65 | 80 | | |
66 | 81 | | |
67 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
68 | 87 | | |
| 88 | + | |
69 | 89 | | |
70 | 90 | | |
71 | 91 | | |
| |||
78 | 98 | | |
79 | 99 | | |
80 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
81 | 105 | | |
| 106 | + | |
82 | 107 | | |
83 | 108 | | |
84 | 109 | | |
| |||
99 | 124 | | |
100 | 125 | | |
101 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
102 | 131 | | |
| 132 | + | |
103 | 133 | | |
104 | 134 | | |
105 | 135 | | |
| |||
108 | 138 | | |
109 | 139 | | |
110 | 140 | | |
111 | | - | |
112 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
113 | 149 | | |
114 | 150 | | |
115 | 151 | | |
| |||
154 | 190 | | |
155 | 191 | | |
156 | 192 | | |
157 | | - | |
158 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
159 | 203 | | |
160 | 204 | | |
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
20 | 27 | | |
21 | 28 | | |
22 | 29 | | |
| |||
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
19 | 26 | | |
20 | 27 | | |
21 | 28 | | |
| |||
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
19 | 26 | | |
20 | 27 | | |
21 | 28 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
24 | 28 | | |
| 29 | + | |
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
| |||
Lines changed: 60 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
| 35 | + | |
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
| |||
40 | 45 | | |
41 | 46 | | |
42 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
43 | 52 | | |
| 53 | + | |
44 | 54 | | |
45 | 55 | | |
46 | 56 | | |
47 | 57 | | |
48 | 58 | | |
49 | 59 | | |
50 | 60 | | |
51 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
52 | 69 | | |
53 | 70 | | |
54 | 71 | | |
55 | 72 | | |
56 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
57 | 81 | | |
58 | 82 | | |
59 | 83 | | |
60 | 84 | | |
61 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
62 | 93 | | |
63 | 94 | | |
64 | 95 | | |
65 | 96 | | |
66 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
67 | 105 | | |
68 | 106 | | |
69 | 107 | | |
70 | 108 | | |
71 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
72 | 117 | | |
73 | 118 | | |
74 | 119 | | |
| |||
78 | 123 | | |
79 | 124 | | |
80 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
81 | 130 | | |
| 131 | + | |
82 | 132 | | |
83 | 133 | | |
84 | 134 | | |
| |||
107 | 157 | | |
108 | 158 | | |
109 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
110 | 164 | | |
| 165 | + | |
111 | 166 | | |
112 | 167 | | |
113 | 168 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
29 | 33 | | |
| 34 | + | |
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
| |||
0 commit comments