Files
keyhunter/.planning/phases/02-tier-1-2-providers/02-02-PLAN.md
2026-04-05 14:08:04 +03:00

7.9 KiB

phase, plan, type, wave, depends_on, files_modified, autonomous, requirements, must_haves
phase plan type wave depends_on files_modified autonomous requirements must_haves
02-tier-1-2-providers 02 execute 1
providers/azure-openai.yaml
providers/meta-ai.yaml
providers/cohere.yaml
providers/mistral.yaml
providers/inflection.yaml
providers/ai21.yaml
pkg/providers/definitions/azure-openai.yaml
pkg/providers/definitions/meta-ai.yaml
pkg/providers/definitions/cohere.yaml
pkg/providers/definitions/mistral.yaml
pkg/providers/definitions/inflection.yaml
pkg/providers/definitions/ai21.yaml
true
PROV-01
truths artifacts key_links
Registry loads 6 medium/low-confidence Tier 1 providers
Each provider relies on keyword-context matching (weak prefix)
All regex patterns compile under Go RE2
path provides contains
providers/azure-openai.yaml Azure OpenAI 32-hex pattern azure
path provides contains
providers/cohere.yaml Cohere 40-char token pattern cohere
path provides contains
providers/mistral.yaml Mistral AI keyword-anchored pattern mistral
from to via pattern
provider keywords[] Registry Aho-Corasick automaton NewRegistry() keywords
Create the 6 medium/low-confidence Tier 1 LLM provider YAML definitions: Azure OpenAI, Meta AI (Llama), Cohere, Mistral AI, Inflection AI, AI21 Labs. These providers use generic key formats — detection leans on strong keyword lists for Aho-Corasick pre-filtering.

Purpose: Close out Tier 1 coverage (12/12). These providers require careful keyword anchoring since their key formats are opaque tokens.

Output: 12 YAML files (6 providers x 2 locations).

Addresses PROV-01 requirement.

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

@.planning/ROADMAP.md @.planning/phases/02-tier-1-2-providers/02-RESEARCH.md @pkg/providers/schema.go @providers/openai.yaml Schema: see pkg/providers/schema.go. NO `category` field. `confidence` must be one of: high, medium, low. Files must be dual-located (providers/ AND pkg/providers/definitions/). Go RE2 regex only — no lookahead, lookbehind, or backreferences. Task 1: Azure OpenAI, Meta AI, Cohere YAMLs providers/azure-openai.yaml, providers/meta-ai.yaml, providers/cohere.yaml, pkg/providers/definitions/azure-openai.yaml, pkg/providers/definitions/meta-ai.yaml, pkg/providers/definitions/cohere.yaml - pkg/providers/schema.go - .planning/phases/02-tier-1-2-providers/02-RESEARCH.md sections "6. Azure OpenAI", "7. Meta AI", "9. Cohere" Create providers/azure-openai.yaml:
format_version: 1
name: azure-openai
display_name: Azure OpenAI
tier: 1
last_verified: "2026-04-05"
keywords:
  - "azure"
  - "openai.azure.com"
  - "azure_openai"
  - "cognitiveservices"
  - "AZURE_OPENAI_API_KEY"
  - "AZURE_OPENAI_KEY"
patterns:
  - regex: '[a-f0-9]{32}'
    entropy_min: 3.5
    confidence: low
verify:
  method: GET
  url: ""
  headers: {}
  valid_status: []
  invalid_status: []

Create providers/meta-ai.yaml:

format_version: 1
name: meta-ai
display_name: Meta AI (Llama API)
tier: 1
last_verified: "2026-04-05"
keywords:
  - "meta_llama"
  - "llama_api"
  - "META_LLAMA_API_KEY"
  - "api.llama.com"
patterns:
  - regex: 'LLM\|[A-Za-z0-9_\-]{30,}'
    entropy_min: 3.5
    confidence: low
verify:
  method: GET
  url: https://api.llama.com/v1/models
  headers:
    Authorization: "Bearer {KEY}"
  valid_status: [200]
  invalid_status: [401, 403]

Create providers/cohere.yaml:

format_version: 1
name: cohere
display_name: Cohere
tier: 1
last_verified: "2026-04-05"
keywords:
  - "cohere"
  - "CO_API_KEY"
  - "COHERE_API_KEY"
  - "cohere_api"
  - "api.cohere.ai"
patterns:
  - regex: '[a-zA-Z0-9]{40}'
    entropy_min: 4.0
    confidence: low
verify:
  method: GET
  url: https://api.cohere.ai/v1/models
  headers:
    Authorization: "Bearer {KEY}"
  valid_status: [200]
  invalid_status: [401, 403]

Copy all three files VERBATIM to pkg/providers/definitions/ with same names. cd /home/salva/Documents/apikey && for f in azure-openai meta-ai cohere; do diff providers/$f.yaml pkg/providers/definitions/$f.yaml || exit 1; done && go test ./pkg/providers/... -count=1 <acceptance_criteria> - All 6 files exist - grep -q 'openai.azure.com' providers/azure-openai.yaml - grep -q 'CO_API_KEY' providers/cohere.yaml - grep -q 'api.llama.com' providers/meta-ai.yaml - diff providers/cohere.yaml pkg/providers/definitions/cohere.yaml returns no diff - go test ./pkg/providers/... -count=1 passes </acceptance_criteria> 3 providers dual-located, registry loads them without validation errors.

Task 2: Mistral, Inflection, AI21 YAMLs providers/mistral.yaml, providers/inflection.yaml, providers/ai21.yaml, pkg/providers/definitions/mistral.yaml, pkg/providers/definitions/inflection.yaml, pkg/providers/definitions/ai21.yaml - pkg/providers/schema.go - .planning/phases/02-tier-1-2-providers/02-RESEARCH.md sections "10. Mistral AI", "11. Inflection AI", "12. AI21 Labs" Create providers/mistral.yaml:
format_version: 1
name: mistral
display_name: Mistral AI
tier: 1
last_verified: "2026-04-05"
keywords:
  - "mistral"
  - "mistral.ai"
  - "MISTRAL_API_KEY"
  - "la_plateforme"
  - "api.mistral.ai"
patterns:
  - regex: '[a-zA-Z0-9]{32}'
    entropy_min: 4.0
    confidence: low
verify:
  method: GET
  url: https://api.mistral.ai/v1/models
  headers:
    Authorization: "Bearer {KEY}"
  valid_status: [200]
  invalid_status: [401, 403]

Create providers/inflection.yaml:

format_version: 1
name: inflection
display_name: Inflection AI (Pi)
tier: 1
last_verified: "2026-04-05"
keywords:
  - "inflection"
  - "pi_api"
  - "PI_API_KEY"
  - "INFLECTION_API_KEY"
  - "inflection.ai"
patterns:
  - regex: '[A-Za-z0-9_\-]{40,}'
    entropy_min: 4.0
    confidence: low
verify:
  method: GET
  url: ""
  headers: {}
  valid_status: []
  invalid_status: []

Create providers/ai21.yaml:

format_version: 1
name: ai21
display_name: AI21 Labs
tier: 1
last_verified: "2026-04-05"
keywords:
  - "ai21"
  - "AI21_API_KEY"
  - "jamba"
  - "jurassic"
  - "api.ai21.com"
patterns:
  - regex: '[a-zA-Z0-9]{32,}'
    entropy_min: 4.0
    confidence: low
verify:
  method: GET
  url: https://api.ai21.com/studio/v1/models
  headers:
    Authorization: "Bearer {KEY}"
  valid_status: [200]
  invalid_status: [401, 403]

Copy all three files VERBATIM to pkg/providers/definitions/ with same names. cd /home/salva/Documents/apikey && for f in mistral inflection ai21; do diff providers/$f.yaml pkg/providers/definitions/$f.yaml || exit 1; done && go test ./pkg/providers/... -count=1 <acceptance_criteria> - All 6 files exist - grep -q 'MISTRAL_API_KEY' providers/mistral.yaml - grep -q 'jamba' providers/ai21.yaml - grep -q 'PI_API_KEY' providers/inflection.yaml - diff providers/mistral.yaml pkg/providers/definitions/mistral.yaml returns no diff - go test ./pkg/providers/... -count=1 passes </acceptance_criteria> 3 providers dual-located. Tier 1 complete at 12/12.

Count providers with tier 1 after this plan runs: `grep -l 'tier: 1' providers/*.yaml | wc -l` should equal 12.

<success_criteria>

  • 6 Tier 1 medium/low-confidence providers created
  • Dual-location sync verified
  • Registry loads them without validation errors (go test passes)
  • Tier 1 total = 12 providers </success_criteria>
After completion, create `.planning/phases/02-tier-1-2-providers/02-02-SUMMARY.md`