Commit b82e790
committed
fix(openai-base): prefer videos.retrieve URL for video content
Main's OpenAI video adapter and the aimock E2E harness both surface
the final video URL on the video resource itself rather than via a
separate /content endpoint. The openai-base extraction was calling
client.videos.downloadContent() first — which exists on the current
SDK — causing it to hit a /content endpoint aimock doesn't serve
and fail every openai video-gen E2E test.
Reorder getVideoUrl to prefer the retrieve-returns-url path (matching
main's behavior) and only fall through to SDK download methods when
retrieve doesn't surface a URL. Also drop the erroneous * 1000 on
expires_at (OpenAI returns it in ms already, matching main).1 parent 247bb33 commit b82e790
1 file changed
Lines changed: 23 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
130 | 144 | | |
| 145 | + | |
| 146 | + | |
131 | 147 | | |
132 | | - | |
133 | 148 | | |
134 | 149 | | |
135 | 150 | | |
| |||
141 | 156 | | |
142 | 157 | | |
143 | 158 | | |
144 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
145 | 163 | | |
146 | 164 | | |
147 | 165 | | |
148 | 166 | | |
149 | 167 | | |
150 | 168 | | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
| 169 | + | |
164 | 170 | | |
165 | 171 | | |
166 | 172 | | |
| |||
205 | 211 | | |
206 | 212 | | |
207 | 213 | | |
208 | | - | |
| 214 | + | |
209 | 215 | | |
210 | 216 | | |
211 | 217 | | |
| |||
0 commit comments