Files
wehub-resource-sync 0d3cb498a3
CI / Shell Format Check (push) Has been cancelled
CI / Check Ruby (3.4) (push) Has been cancelled
CI / CI Config (push) Has been cancelled
CI / Test on Node ${{ matrix.node }} and ${{ matrix.os }}${{ matrix.shard && format(' (shard {0}/3)', matrix.shard) || '' }} (push) Has been cancelled
CI / Build on Node ${{ matrix.node }} (push) Has been cancelled
CI / Style Check (push) Has been cancelled
CI / Generate Assets (push) Has been cancelled
CI / Check Python (3.14) (push) Has been cancelled
CI / Check Python (3.9) (push) Has been cancelled
CI / Build Docs (push) Has been cancelled
CI / Code Scan Action (push) Has been cancelled
CI / Site tests (push) Has been cancelled
CI / webui tests (push) Has been cancelled
CI / Run Integration Tests (push) Has been cancelled
CI / Run Smoke Tests (push) Has been cancelled
CI / Go Tests (push) Has been cancelled
CI / Share Test (push) Has been cancelled
CI / Redteam (Production API) (push) Has been cancelled
CI / Redteam (Staging API) (push) Has been cancelled
CI / GitHub Actions Lint (push) Has been cancelled
CI / Check Ruby (3.0) (push) Has been cancelled
release-please / release-please (push) Has been cancelled
release-please / build (push) Has been cancelled
release-please / publish-npm (push) Has been cancelled
release-please / publish-npm-backfill (push) Has been cancelled
release-please / docker (push) Has been cancelled
release-please / publish-code-scan-action (push) Has been cancelled
release-please / attest-code-scan-action (push) Has been cancelled
Deploy local.promptfoo.app / Deploy to Cloudflare Pages (push) Has been cancelled
Test and Publish Multi-arch Docker Image / test (push) Has been cancelled
Test and Publish Multi-arch Docker Image / build-docker-and-push-digests (map[digest-suffix:linux-amd64 platform:linux/amd64 runner:ubuntu-latest]) (push) Has been cancelled
Test and Publish Multi-arch Docker Image / build-docker-and-push-digests (map[digest-suffix:linux-arm64 platform:linux/arm64 runner:ubuntu-24.04-arm]) (push) Has been cancelled
Test and Publish Multi-arch Docker Image / merge-docker-digests (push) Has been cancelled
Test and Publish Multi-arch Docker Image / Attest Multi-arch Image (push) Has been cancelled
Validate Renovate Config / Validate Renovate Configuration (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:24:08 +08:00

4.1 KiB

sidebar_label, description
sidebar_label description
Link to Cloud Targets Link local custom providers to cloud targets in Promptfoo Cloud using linkedTargetId to consolidate findings and track performance over time

Linking Local Targets to Cloud

When using custom providers (Python, JavaScript, HTTP), link your local configuration to a cloud target using linkedTargetId. This consolidates findings from multiple eval runs into one dashboard, allowing you to track performance and vulnerabilities over time and view comprehensive reporting.

Step 1: Get the Target ID

  1. Log in to Promptfoo Cloud (https://www.promptfoo.app/ or your on-prem URL)
  2. Navigate to the Targets page: /redteam/targets
  3. Find the target you want to link to
  4. Copy its ID (looks like 12345678-1234-1234-1234-123456789abc)

Step 2: Add to Provider Config

Format the ID as promptfoo://provider/<target-id> and add to your provider config:

Python provider:

providers:
  - id: 'file://my_provider.py'
    config:
      linkedTargetId: 'promptfoo://provider/12345678-1234-1234-1234-123456789abc'
      # Your other config...

JavaScript provider:

providers:
  - id: 'file://customProvider.js'
    config:
      linkedTargetId: 'promptfoo://provider/12345678-1234-1234-1234-123456789abc'
      # Your other config...

HTTP provider:

providers:
  - id: https
    config:
      url: 'https://api.example.com/endpoint'
      method: 'POST'
      linkedTargetId: 'promptfoo://provider/12345678-1234-1234-1234-123456789abc'
      headers:
        'Content-Type': 'application/json'
      body:
        prompt: '{{prompt}}'

Step 3: Run Your Eval

Results will now consolidate under the linked cloud target.

Troubleshooting

"Invalid linkedTargetId format" Error

Problem: linkedTargetId doesn't start with promptfoo://provider/

Solution: Ensure format is exactly promptfoo://provider/<UUID>:

# ✅ Correct
linkedTargetId: 'promptfoo://provider/12345678-1234-1234-1234-123456789abc'

# ❌ Wrong - missing prefix
linkedTargetId: '12345678-1234-1234-1234-123456789abc'

# ❌ Wrong - incorrect prefix
linkedTargetId: 'promptfoo://12345678-1234-1234-1234-123456789abc'

"linkedTargetId not found" Error

Problem: Target doesn't exist in your cloud organization or you lack access

Troubleshooting steps:

  1. Verify you're logged in:

    promptfoo auth status
    
  2. Check the target exists:

    • Visit your cloud dashboard /redteam/targets page
    • Verify the target ID is correct
    • Ensure target wasn't deleted
  3. Verify organization access:

    • Targets are scoped to your organization
    • Ensure you're logged into the correct org
    • Confirm you have permission to access this target

linkedTargetId Specified But Cloud Not Configured

Warning message: linkedTargetId specified but cloud is not configured

Problem: You're not logged into Promptfoo Cloud

Solution:

promptfoo auth login

linkedTargetId only works when cloud features are enabled.

FAQ

Q: Can I use linkedTargetId with built-in providers (OpenAI, Anthropic, etc.)?

Yes, linkedTargetId works with any provider type. However, it's most useful for custom providers (Python, JavaScript, HTTP) since they don't have a stable identifier. Built-in providers (like openai:gpt-4) already have consistent IDs, so they're less likely to need manual linking.

Q: What happens if I remove linkedTargetId after using it?

The next eval will create a new target entry. Previous results remain under the linked target.

Q: Can I link to a target from a different organization?

No, targets are organization-scoped. You can only link to targets in your current organization.

Q: Do I need a new linkedTargetId for each eval?

No! Use the same linkedTargetId across all evals. That's the point - it consolidates results under one target.