Skip to content

Commit e07d34e

Browse files
committed
fix(dependencies): update google-adk version to 1.11.0 for compatibility
fix(model): lazy import ARKVeAuth only when api_key is not set
1 parent 4ee3f08 commit e07d34e

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies = [
1515
"pydantic-settings>=2.10.1", # Config management
1616
"a2a-sdk>=0.3.0", # For Google Agent2Agent protocol
1717
"deprecated>=1.2.18",
18-
"google-adk>=1.10.0", # For basic agent architecture
18+
"google-adk>=1.11.0", # For basic agent architecture
1919
"litellm>=1.74.3", # For model inference
2020
"loguru>=0.7.3", # For better logging
2121
"opentelemetry-exporter-otlp>=1.35.0",

veadk/configs/model_configs.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
from pydantic_settings import BaseSettings, SettingsConfigDict
1919

20-
from veadk.auth.veauth.ark_veauth import ARKVeAuth
2120
from veadk.consts import (
2221
DEFAULT_MODEL_AGENT_API_BASE,
2322
DEFAULT_MODEL_AGENT_NAME,
@@ -39,4 +38,10 @@ class ModelConfig(BaseSettings):
3938

4039
@cached_property
4140
def api_key(self) -> str:
42-
return os.getenv("MODEL_AGENT_API_KEY") or ARKVeAuth().token
41+
_api_key = os.getenv("MODEL_AGENT_API_KEY")
42+
if not _api_key:
43+
# Only import ARKVeAuth if api_key is not set
44+
from veadk.auth.veauth.ark_veauth import ARKVeAuth
45+
46+
_api_key = ARKVeAuth().token
47+
return _api_key

0 commit comments

Comments
 (0)