Skip to content

Commit 0f409ca

Browse files
committed
fix(client): enhance additional_headers input types
1 parent 0535010 commit 0f409ca

File tree

1 file changed

+4
-3
lines changed
  • packages/toolbox-adk/src/toolbox_adk

1 file changed

+4
-3
lines changed

packages/toolbox-adk/src/toolbox_adk/client.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from typing import Optional, Dict, Callable, Any, Union
15+
from typing import Optional, Dict, Callable, Any, Union, Awaitable
1616
import toolbox_core
1717
from google.auth import transport
1818
from google.auth import compute_engine
@@ -35,14 +35,15 @@ def __init__(
3535
self,
3636
server_url: str,
3737
credentials: Optional[CredentialConfig] = None,
38-
additional_headers: Optional[Dict[str, str]] = None,
38+
39+
additional_headers: Optional[Dict[str, Union[str, Callable[[], str], Callable[[], Awaitable[str]]]]] = None,
3940
**kwargs
4041
):
4142
"""
4243
Args:
4344
server_url: The URL of the Toolbox server.
4445
credentials: The CredentialConfig object (from CredentialStrategy).
45-
additional_headers: A dictionary of static headers to include in every request.
46+
additional_headers: Dictionary of headers (static or dynamic callables).
4647
**kwargs: Additional arguments passed to toolbox_core.ToolboxClient.
4748
"""
4849
self._server_url = server_url

0 commit comments

Comments
 (0)