---
phase: 02-tier-1-2-providers
plan: 03
type: execute
wave: 1
depends_on: []
files_modified:
  - providers/groq.yaml
  - providers/replicate.yaml
  - providers/anyscale.yaml
  - providers/together.yaml
  - providers/fireworks.yaml
  - providers/baseten.yaml
  - providers/deepinfra.yaml
  - pkg/providers/definitions/groq.yaml
  - pkg/providers/definitions/replicate.yaml
  - pkg/providers/definitions/anyscale.yaml
  - pkg/providers/definitions/together.yaml
  - pkg/providers/definitions/fireworks.yaml
  - pkg/providers/definitions/baseten.yaml
  - pkg/providers/definitions/deepinfra.yaml
autonomous: true
requirements: [PROV-02]
must_haves:
  truths:
    - "Registry loads 7 Tier 2 inference platform providers"
    - "Groq, Replicate, Anyscale use distinctive prefix patterns (high confidence)"
    - "Together, Fireworks, Baseten, DeepInfra use keyword-context matching"
  artifacts:
    - path: "providers/groq.yaml"
      provides: "Groq gsk_ prefix pattern"
      contains: "gsk_"
    - path: "providers/replicate.yaml"
      provides: "Replicate r8_ prefix pattern"
      contains: "r8_"
    - path: "providers/anyscale.yaml"
      provides: "Anyscale esecret_ pattern"
      contains: "esecret_"
  key_links:
    - from: "pkg/providers/definitions/*.yaml"
      to: "go:embed in loader.go"
      via: "compile-time embed"
      pattern: "definitions"
---

<objective>
Create 7 Tier 2 inference platform provider YAMLs: Groq, Replicate, Anyscale, Together AI, Fireworks AI, Baseten, DeepInfra. Groq/Replicate/Anyscale have verified prefixes (HIGH confidence); the rest rely on keyword context.

Purpose: First half of Tier 2 inference platforms (PROV-02). These are OpenAI-compatible providers hosting open-weight models — high-value detection targets.

Output: 14 YAML files (7 providers x 2 locations).

Addresses PROV-02 requirement.
</objective>

<execution_context>
@$HOME/.claude/get-shit-done/workflows/execute-plan.md
@$HOME/.claude/get-shit-done/templates/summary.md
</execution_context>

<context>
@.planning/ROADMAP.md
@.planning/phases/02-tier-1-2-providers/02-RESEARCH.md
@pkg/providers/schema.go

<interfaces>
Schema: pkg/providers/schema.go. Dual-location required. RE2 regex only.
Tier = 2 for all providers in this plan.
</interfaces>
</context>

<tasks>

<task type="auto">
  <name>Task 1: High-confidence prefixed Tier 2 — Groq, Replicate, Anyscale</name>
  <files>providers/groq.yaml, providers/replicate.yaml, providers/anyscale.yaml, pkg/providers/definitions/groq.yaml, pkg/providers/definitions/replicate.yaml, pkg/providers/definitions/anyscale.yaml</files>
  <read_first>
    - pkg/providers/schema.go
    - .planning/phases/02-tier-1-2-providers/02-RESEARCH.md sections "3. Groq", "4. Replicate", "5. Anyscale"
  </read_first>
  <action>
Create providers/groq.yaml:

```yaml
format_version: 1
name: groq
display_name: Groq
tier: 2
last_verified: "2026-04-05"
keywords:
  - "gsk_"
  - "groq"
  - "GROQ_API_KEY"
  - "api.groq.com"
patterns:
  - regex: 'gsk_[a-zA-Z0-9]{52}'
    entropy_min: 3.5
    confidence: high
verify:
  method: GET
  url: https://api.groq.com/openai/v1/models
  headers:
    Authorization: "Bearer {KEY}"
  valid_status: [200]
  invalid_status: [401, 403]
```

Create providers/replicate.yaml:

```yaml
format_version: 1
name: replicate
display_name: Replicate
tier: 2
last_verified: "2026-04-05"
keywords:
  - "r8_"
  - "replicate"
  - "REPLICATE_API_TOKEN"
  - "api.replicate.com"
patterns:
  - regex: 'r8_[0-9A-Za-z\-_]{37}'
    entropy_min: 3.5
    confidence: high
verify:
  method: GET
  url: https://api.replicate.com/v1/predictions
  headers:
    Authorization: "Bearer {KEY}"
  valid_status: [200]
  invalid_status: [401, 403]
```

Create providers/anyscale.yaml:

```yaml
format_version: 1
name: anyscale
display_name: Anyscale Endpoints
tier: 2
last_verified: "2026-04-05"
keywords:
  - "esecret_"
  - "anyscale"
  - "ANYSCALE_API_KEY"
  - "api.endpoints.anyscale.com"
patterns:
  - regex: 'esecret_[A-Za-z0-9_\-]{20,}'
    entropy_min: 3.5
    confidence: high
verify:
  method: GET
  url: https://api.endpoints.anyscale.com/v1/models
  headers:
    Authorization: "Bearer {KEY}"
  valid_status: [200]
  invalid_status: [401, 403]
```

Copy all three to pkg/providers/definitions/ VERBATIM.
  </action>
  <verify>
    <automated>cd /home/salva/Documents/apikey && for f in groq replicate anyscale; do diff providers/$f.yaml pkg/providers/definitions/$f.yaml || exit 1; done && go test ./pkg/providers/... -count=1</automated>
  </verify>
  <acceptance_criteria>
    - `grep -q 'gsk_\[a-zA-Z0-9\]{52}' providers/groq.yaml`
    - `grep -q 'r8_\[0-9A-Za-z' providers/replicate.yaml`
    - `grep -q 'esecret_' providers/anyscale.yaml`
    - All 3 dual-location diffs empty
    - `go test ./pkg/providers/... -count=1` passes
  </acceptance_criteria>
  <done>3 high-confidence Tier 2 providers created with verified regex patterns.</done>
</task>

<task type="auto">
  <name>Task 2: Keyword-anchored Tier 2 — Together, Fireworks, Baseten, DeepInfra</name>
  <files>providers/together.yaml, providers/fireworks.yaml, providers/baseten.yaml, providers/deepinfra.yaml, pkg/providers/definitions/together.yaml, pkg/providers/definitions/fireworks.yaml, pkg/providers/definitions/baseten.yaml, pkg/providers/definitions/deepinfra.yaml</files>
  <read_first>
    - pkg/providers/schema.go
    - .planning/phases/02-tier-1-2-providers/02-RESEARCH.md sections "1. Together AI", "2. Fireworks AI", "9. Baseten", "6. DeepInfra"
  </read_first>
  <action>
Create providers/together.yaml:

```yaml
format_version: 1
name: together
display_name: Together AI
tier: 2
last_verified: "2026-04-05"
keywords:
  - "together"
  - "togetherai"
  - "TOGETHER_API_KEY"
  - "api.together.xyz"
  - "api.together.ai"
patterns:
  - regex: '[a-f0-9]{64}'
    entropy_min: 3.5
    confidence: low
verify:
  method: GET
  url: https://api.together.xyz/v1/models
  headers:
    Authorization: "Bearer {KEY}"
  valid_status: [200]
  invalid_status: [401, 403]
```

Create providers/fireworks.yaml:

```yaml
format_version: 1
name: fireworks
display_name: Fireworks AI
tier: 2
last_verified: "2026-04-05"
keywords:
  - "fireworks"
  - "fireworks.ai"
  - "FIREWORKS_API_KEY"
  - "api.fireworks.ai"
  - "fw_"
patterns:
  - regex: 'fw_[A-Za-z0-9]{20,}'
    entropy_min: 3.5
    confidence: medium
  - regex: '[A-Za-z0-9]{40,}'
    entropy_min: 4.0
    confidence: low
verify:
  method: GET
  url: https://api.fireworks.ai/inference/v1/models
  headers:
    Authorization: "Bearer {KEY}"
  valid_status: [200]
  invalid_status: [401, 403]
```

Create providers/baseten.yaml:

```yaml
format_version: 1
name: baseten
display_name: Baseten
tier: 2
last_verified: "2026-04-05"
keywords:
  - "baseten"
  - "BASETEN_API_KEY"
  - "api.baseten.co"
  - "Api-Key"
patterns:
  - regex: '[A-Za-z0-9]{40,}'
    entropy_min: 4.0
    confidence: low
verify:
  method: GET
  url: https://api.baseten.co/v1/models
  headers:
    Authorization: "Api-Key {KEY}"
  valid_status: [200]
  invalid_status: [401, 403]
```

Create providers/deepinfra.yaml:

```yaml
format_version: 1
name: deepinfra
display_name: DeepInfra
tier: 2
last_verified: "2026-04-05"
keywords:
  - "deepinfra"
  - "DEEPINFRA_API_KEY"
  - "deepinfra.com"
  - "api.deepinfra.com"
patterns:
  - regex: '[A-Za-z0-9]{32,}'
    entropy_min: 4.0
    confidence: low
verify:
  method: GET
  url: https://api.deepinfra.com/v1/openai/models
  headers:
    Authorization: "Bearer {KEY}"
  valid_status: [200]
  invalid_status: [401, 403]
```

Copy all four files VERBATIM to pkg/providers/definitions/.
  </action>
  <verify>
    <automated>cd /home/salva/Documents/apikey && for f in together fireworks baseten deepinfra; do diff providers/$f.yaml pkg/providers/definitions/$f.yaml || exit 1; done && go test ./pkg/providers/... -count=1</automated>
  </verify>
  <acceptance_criteria>
    - All 8 files exist
    - `grep -q 'api.together' providers/together.yaml`
    - `grep -q 'fw_' providers/fireworks.yaml`
    - `grep -q 'Api-Key' providers/baseten.yaml`
    - `grep -q 'api.deepinfra.com' providers/deepinfra.yaml`
    - All dual-location diffs empty
    - `go test ./pkg/providers/... -count=1` passes
  </acceptance_criteria>
  <done>4 keyword-anchored Tier 2 providers dual-located and loading cleanly.</done>
</task>

</tasks>

<verification>
After plan completes: `grep -l 'tier: 2' providers/*.yaml | wc -l` should be at least 7.
</verification>

<success_criteria>
- 7 Tier 2 inference platform providers created
- 3 high-confidence (Groq/Replicate/Anyscale), 4 keyword-anchored
- Dual-location verified
- go test ./pkg/providers/... passes
</success_criteria>

<output>
After completion, create `.planning/phases/02-tier-1-2-providers/02-03-SUMMARY.md`
</output>
