Skip to content

Cannot import HttpAuth and HttpCredentials #2257

@vv-varun

Description

@vv-varun

Describe the bug
When defining OpenAPIToolset, we cannot import HttpAuth and HttpCredentials because they are not imported in google/adk/auth/__int.py__

To Reproduce
Steps to reproduce the behavior, define AuthCredential like this:

http_auth_credential = AuthCredential(
        auth_type=AuthCredentialTypes.HTTP,
        http=HttpAuth(
            scheme='bearer',
            credentials=HttpCredentials(
                token=""
            )
        )
    )

At build time, complier gives error that HttpAuth and HttpCredentials are of unknown type.

Expected behavior
It should be possible to import these modules like : from google.adk.auth import OAuth2Auth, HttpAuth, HttpCredentials

Desktop:

  • OS: iOS
  • Python version(python -V): 3.12.6
  • ADK version(pip show google-adk): 1.8.0

Metadata

Metadata

Assignees

Labels

bot triaged[Bot] This issue is triaged by ADK bottools[Component] This issue is related to tools

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions