a2aproject / a2aproject/a2a-samples

[Bug]: crewai sample doesn't work, doesn't generate images

Open
#43 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
1.8k
Forks
751
PR merge metrics
No merged PRs in 30d

Description

### What happened?

```bash
> cd A2A/samples/python/agents/crewai
> cat .env
GOOGLE_API_KEY="xxxxxxxxx"
> uv run .
```

Starts up ok, but doesn't generate images.

**API keys are not supported by this API. Expected OAuth2 access token or other authentication credentials that assert a principal. See https://cloud.google.com/docs/authentication**

```
INFO:httpx:HTTP Request: POST https://aiplatform.googleapis.com/v1beta1/publishers/google/models/gemini-2.0-flash-exp-image-generation:generateContent "HTTP/1.1 401 Unauthorized"
ERROR:agent:Error generating image 401 UNAUTHENTICATED. {'error': {'code': 401, 'message': 'API keys are not supported by this API. Expected OAuth2 access token or other authentication credentials that assert a principal. See https://cloud.google.com/docs/authentication', 'status': 'UNAUTHENTICATED', 'details': [{'@type': 'type.googleapis.com/google.rpc.ErrorInfo', 'reason': 'CREDENTIALS_MISSING', 'domain': 'googleapis.com', 'metadata': {'service': 'aiplatform.googleapis.com', 'method': 'google.cloud.aiplatform.v1beta1.PredictionService.GenerateContent'}}]}}
Exception 401 UNAUTHENTICATED. {'error': {'code': 401, 'message': 'API keys are not supported by this API. Expected OAuth2 access token or other authentication credentials that assert a principal. See https://cloud.google.com/docs/authentication', 'status': 'UNAUTHENTICATED', 'details': [{'@type': 'type.googleapis.com/google.rpc.ErrorInfo', 'reason': 'CREDENTIALS_MISSING', 'domain': 'googleapis.com', 'metadata': {'service': 'aiplatform.googleapis.com', 'method': 'google.cloud.aiplatform.v1beta1.PredictionService.GenerateContent'}}]}}
```

### Relevant log output

```shell

```

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.