hermes - 💡(How to fix) Fix [Bug] GCP Vertex AI connection fails with 404 using 'gcp' and 'rest' drivers, while direct curl works

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Hermes is unable to connect to a custom provider for Google Cloud Vertex AI using Anthropic's Claude 3 Sonnet model. It consistently fails with an HTTP 404 Not Found error, even though a direct curl command to the same endpoint with the same credentials works perfectly. This occurs with both the gcp driver and the more generic rest driver. Hermes fails after 3 retries with a 404 error: API call failed after 3 retries: HTTP 404: Error code: 404 - [{'error': {'code': 404, 'message': 'models/claude-sonnet-4-6 is not found for API version v1main, or is not supported for generateContent. Call ModelService.ListModels to see the list of available models and their supported methods.', 'status': 'NOT_FOUND'}}]

RAW_BUFFERClick to expand / collapse
Describe the bug
Hermes is unable to connect to a custom provider for Google Cloud Vertex AI using Anthropic's Claude 3 Sonnet model. It consistently fails with an HTTP 404 Not Found error, even though a direct curl command to the same endpoint with the same credentials works perfectly. This occurs with both the gcp driver and the more generic rest driver.

To Reproduce

1.  Configure a custom provider in config.yaml as follows:

    yaml
    # ~/.hermes/config.yaml
    model:
      default: claude-sonnet-4-6
      provider: custom
      subprovider: vertex-claude

    providers:
      custom_providers:
      - name: vertex-claude
        driver: rest
        auth:
          type: gcp
        base_url: https://aiplatform.googleapis.com/v1/projects/rtp-client-agents/locations/global/publishers/anthropic/models/{model}:streamRawPredict
        extra_body:
          anthropic_version: "vertex-2023-10-16"
        models:
        - name: claude-sonnet-4-6
          context_window: 200000
          supports_tools: true
          supports_vision: true
          default_params:
            max_tokens: 4096


2.  Ensure you are authenticated with GCP via gcloud auth application-default login.

3.  Run a simple prompt command:
    bash
    hermes -z "This is a test."


Expected behavior
Hermes should connect to the Vertex AI API and return a response from the model, just like the direct curl command does.

Actual behavior
Hermes fails after 3 retries with a 404 error:

API call failed after 3 retries: HTTP 404: Error code: 404 - [{'error': {'code': 404, 'message': 'models/claude-sonnet-4-6 is not found for API version v1main, or is not supported for generateContent. Call ModelService.ListModels to see the list of available models and their supported methods.', 'status': 'NOT_FOUND'}}]


Crucial Evidence: Working curl command

The following curl command, run from the same terminal session, works perfectly and returns a valid response from the model. This proves that GCP permissions, project ID, region, model name, and authentication are all correct.

bash
curl -X POST \
  -H "Authorization: Bearer *** auth print-access-token)" \
  -H "Content-Type: application/json; charset=utf-8" \
  -d '{
    "anthropic_version": "vertex-2023-10-16",
    "messages": [
      {
        "role": "user",
        "content": "This is a test, reply with the word: confirmed."
      }
    ],
    "max_tokens": 256
  }' \
  "https://aiplatform.googleapis.com/v1/projects/rtp-client-agents/locations/global/publishers/anthropic/models/claude-sonnet-4-6:streamRawPredict"


Successful curl Output:
json
{"model":"claude-sonnet-4-6","id":"...","type":"message","role":"assistant","content":[{"type":"text","text":"Confirmed."}],"stop_reason":"end_turn", ...}


Conclusion
Since the direct API call via curl works, the issue must lie in how Hermes is constructing or sending the HTTP request via its rest (and gcp) driver, causing the same valid endpoint to return a 404.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING