Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion google/genai/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,19 +135,29 @@ def client(use_vertex, replays_prefix, http_options, request):
os.environ['GOOGLE_GENAI_REPLAYS_DIRECTORY'] = replays_root_directory
# Get private arg.
private = request.config.getoption('--private')

location_override = None
if use_vertex and 'tunings' in replays_prefix:
if os.environ.get('GOOGLE_CLOUD_LOCATION') == 'global':
location_override = 'us-central1'

replay_client = _replay_api_client.ReplayApiClient(
mode=mode,
replay_id=replay_id,
vertexai=use_vertex,
http_options=http_options,
private=private,
location=location_override,
)

with mock.patch.object(
google_genai_client_module.Client, '_get_api_client'
) as patch_method:
patch_method.return_value = replay_client
google_genai_client = google_genai_client_module.Client(vertexai=use_vertex)
kwargs = {'vertexai': use_vertex}
if location_override:
kwargs['location'] = location_override
google_genai_client = google_genai_client_module.Client(**kwargs)

# Yield the client so that cleanup can be completed at the end of the test.
yield google_genai_client
Expand Down
2 changes: 1 addition & 1 deletion google/genai/tests/shared/models/test_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
pytest_helper.TestTableItem(
name='test_embed_gemini_embedding_2',
parameters=genai_types.EmbedContentParameters(
model='gemini-embedding-2-preview',
model='gemini-embedding-2',
contents='Hello world!',
config={
'output_dimensionality': 10,
Expand Down
4 changes: 2 additions & 2 deletions google/genai/tests/shared/tunings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# GEMINI_TUNABLE_MODEL = 'gemini-3.1-flash-lite'
GEMINI_TUNABLE_MODEL = 'gemini-2.5-pro'

GEMINI_TUNABLE_MODEL = 'gemini-3.1-flash-lite'
Loading