Move Firecrawl API key from top-level config into Agents.Tools
Firecrawl is a tool used by agents (tracker mapping, third-party assessor), so its configuration belongs under AgentsConfig rather than as a standalone Config field. Adds AgentToolsConfig to hold agent tool credentials and updates all config propagation consumers. Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
@@ -232,8 +232,8 @@ spec:
|
|||||||
- name: OPENAI_MAX_TOKENS
|
- name: OPENAI_MAX_TOKENS
|
||||||
value: {{ .Values.probo.openai.maxTokens | quote }}
|
value: {{ .Values.probo.openai.maxTokens | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
# Firecrawl Integration
|
# Agent Tools
|
||||||
{{- if .Values.probo.firecrawl.apiKey }}
|
{{- if .Values.probo.agentTools.firecrawlApiKey }}
|
||||||
- name: FIRECRAWL_API_KEY
|
- name: FIRECRAWL_API_KEY
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
|
|||||||
@@ -35,9 +35,9 @@ stringData:
|
|||||||
openai-api-key: {{ .Values.probo.openai.apiKey | quote }}
|
openai-api-key: {{ .Values.probo.openai.apiKey | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
# Optional Firecrawl API key
|
# Optional Firecrawl API key (agent tools)
|
||||||
{{- if .Values.probo.firecrawl.apiKey }}
|
{{- if .Values.probo.agentTools.firecrawlApiKey }}
|
||||||
firecrawl-api-key: {{ .Values.probo.firecrawl.apiKey | quote }}
|
firecrawl-api-key: {{ .Values.probo.agentTools.firecrawlApiKey | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
# Optional SAML secrets
|
# Optional SAML secrets
|
||||||
|
|||||||
@@ -159,9 +159,9 @@ probo:
|
|||||||
modelName: "gpt-4o"
|
modelName: "gpt-4o"
|
||||||
maxTokens: 4096
|
maxTokens: 4096
|
||||||
|
|
||||||
# Firecrawl web search (optional, used by tracker mapping agent)
|
# Agent tools (optional, shared across agents)
|
||||||
# firecrawl:
|
# agentTools:
|
||||||
# apiKey: "CHANGE_ME_FIRECRAWL_API_KEY"
|
# firecrawlApiKey: "CHANGE_ME_FIRECRAWL_API_KEY"
|
||||||
|
|
||||||
# Tracker mapping agent (optional, auto-links tracker patterns to vendors)
|
# Tracker mapping agent (optional, auto-links tracker patterns to vendors)
|
||||||
# trackerMapping:
|
# trackerMapping:
|
||||||
|
|||||||
@@ -257,9 +257,10 @@ probo:
|
|||||||
modelName: "gpt-4o"
|
modelName: "gpt-4o"
|
||||||
maxTokens: 4096
|
maxTokens: 4096
|
||||||
|
|
||||||
# Firecrawl web search integration (optional, used by tracker mapping agent)
|
# Agent tools (optional, shared across agents)
|
||||||
firecrawl:
|
agentTools:
|
||||||
apiKey: ""
|
# Firecrawl web search API key (used by tracker mapping and third-party assessor agents)
|
||||||
|
firecrawlApiKey: ""
|
||||||
|
|
||||||
# Tracker mapping agent (optional, requires openai.apiKey or anthropic key)
|
# Tracker mapping agent (optional, requires openai.apiKey or anthropic key)
|
||||||
trackerMapping:
|
trackerMapping:
|
||||||
|
|||||||
@@ -176,9 +176,6 @@ func (b *Builder) Build() (*probodconfig.FullConfig, error) {
|
|||||||
CacheTTL: b.getEnvIntOrDefault("WEBHOOK_CACHE_TTL", 86400),
|
CacheTTL: b.getEnvIntOrDefault("WEBHOOK_CACHE_TTL", 86400),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Firecrawl: probodconfig.FirecrawlConfig{
|
|
||||||
APIKey: b.getEnv("FIRECRAWL_API_KEY"),
|
|
||||||
},
|
|
||||||
Agents: probodconfig.AgentsConfig{
|
Agents: probodconfig.AgentsConfig{
|
||||||
Providers: map[string]probodconfig.LLMProviderConfig{
|
Providers: map[string]probodconfig.LLMProviderConfig{
|
||||||
"openai": {
|
"openai": {
|
||||||
@@ -214,6 +211,9 @@ func (b *Builder) Build() (*probodconfig.FullConfig, error) {
|
|||||||
Temperature: b.getEnvFloatPtr("AGENT_TRACKER_MAPPING_TEMPERATURE"),
|
Temperature: b.getEnvFloatPtr("AGENT_TRACKER_MAPPING_TEMPERATURE"),
|
||||||
MaxTokens: b.getEnvIntPtr("AGENT_TRACKER_MAPPING_MAX_TOKENS"),
|
MaxTokens: b.getEnvIntPtr("AGENT_TRACKER_MAPPING_MAX_TOKENS"),
|
||||||
},
|
},
|
||||||
|
Tools: probodconfig.AgentToolsConfig{
|
||||||
|
FirecrawlAPIKey: b.getEnv("FIRECRAWL_API_KEY"),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
CustomDomains: probodconfig.CustomDomainsConfig{
|
CustomDomains: probodconfig.CustomDomainsConfig{
|
||||||
RenewalInterval: b.getEnvIntOrDefault("CUSTOM_DOMAINS_RENEWAL_INTERVAL", 3600),
|
RenewalInterval: b.getEnvIntOrDefault("CUSTOM_DOMAINS_RENEWAL_INTERVAL", 3600),
|
||||||
|
|||||||
@@ -197,8 +197,8 @@ func TestBuilder_Build_Defaults(t *testing.T) {
|
|||||||
assert.Equal(t, 5, cfg.Probod.Notifications.Webhook.SenderInterval)
|
assert.Equal(t, 5, cfg.Probod.Notifications.Webhook.SenderInterval)
|
||||||
assert.Equal(t, 86400, cfg.Probod.Notifications.Webhook.CacheTTL)
|
assert.Equal(t, 86400, cfg.Probod.Notifications.Webhook.CacheTTL)
|
||||||
|
|
||||||
// Firecrawl — empty by default
|
// Agents tools — Firecrawl empty by default
|
||||||
assert.Empty(t, cfg.Probod.Firecrawl.APIKey)
|
assert.Empty(t, cfg.Probod.Agents.Tools.FirecrawlAPIKey)
|
||||||
|
|
||||||
// Agents config — default
|
// Agents config — default
|
||||||
assert.Equal(t, "openai", cfg.Probod.Agents.Default.Provider)
|
assert.Equal(t, "openai", cfg.Probod.Agents.Default.Provider)
|
||||||
@@ -378,8 +378,8 @@ func TestBuilder_Build_CustomValues(t *testing.T) {
|
|||||||
assert.Equal(t, "slack-signing-secret", cfg.Probod.Notifications.Slack.SigningSecret)
|
assert.Equal(t, "slack-signing-secret", cfg.Probod.Notifications.Slack.SigningSecret)
|
||||||
assert.Equal(t, 10, cfg.Probod.Notifications.Webhook.SenderInterval)
|
assert.Equal(t, 10, cfg.Probod.Notifications.Webhook.SenderInterval)
|
||||||
assert.Equal(t, 3600, cfg.Probod.Notifications.Webhook.CacheTTL)
|
assert.Equal(t, 3600, cfg.Probod.Notifications.Webhook.CacheTTL)
|
||||||
// Firecrawl
|
// Agents tools — Firecrawl
|
||||||
assert.Equal(t, "fc-test-key", cfg.Probod.Firecrawl.APIKey)
|
assert.Equal(t, "fc-test-key", cfg.Probod.Agents.Tools.FirecrawlAPIKey)
|
||||||
// Agents — providers
|
// Agents — providers
|
||||||
assert.Equal(t, "openai", cfg.Probod.Agents.Providers["openai"].Type)
|
assert.Equal(t, "openai", cfg.Probod.Agents.Providers["openai"].Type)
|
||||||
assert.Equal(t, "sk-test-key", cfg.Probod.Agents.Providers["openai"].APIKey)
|
assert.Equal(t, "sk-test-key", cfg.Probod.Agents.Providers["openai"].APIKey)
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ func (impl *Implm) buildThirdPartyAssessor(
|
|||||||
Model: agentCfg.ModelName,
|
Model: agentCfg.ModelName,
|
||||||
MaxTokens: maxTokens,
|
MaxTokens: maxTokens,
|
||||||
ChromeAddr: impl.cfg.ChromeDPAddr,
|
ChromeAddr: impl.cfg.ChromeDPAddr,
|
||||||
FirecrawlAPIKey: impl.cfg.Firecrawl.APIKey,
|
FirecrawlAPIKey: impl.cfg.Agents.Tools.FirecrawlAPIKey,
|
||||||
Logger: l.Named("third-party-assessor"),
|
Logger: l.Named("third-party-assessor"),
|
||||||
}), nil
|
}), nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,6 @@ func (impl *Implm) buildTrackerMappingConfig(
|
|||||||
return cookiebanner.TrackerMappingConfig{
|
return cookiebanner.TrackerMappingConfig{
|
||||||
LLMClient: llmClient,
|
LLMClient: llmClient,
|
||||||
Model: agentCfg.ModelName,
|
Model: agentCfg.ModelName,
|
||||||
FirecrawlAPIKey: impl.cfg.Firecrawl.APIKey,
|
FirecrawlAPIKey: impl.cfg.Agents.Tools.FirecrawlAPIKey,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,11 +47,6 @@ type (
|
|||||||
TSAURL string `json:"tsa-url"`
|
TSAURL string `json:"tsa-url"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// FirecrawlConfig contains Firecrawl web scraping API configuration.
|
|
||||||
FirecrawlConfig struct {
|
|
||||||
APIKey string `json:"api-key"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Config represents the probod application configuration.
|
// Config represents the probod application configuration.
|
||||||
Config struct {
|
Config struct {
|
||||||
BaseURL string `json:"base-url"`
|
BaseURL string `json:"base-url"`
|
||||||
@@ -66,7 +61,6 @@ type (
|
|||||||
Agents AgentsConfig `json:"llm"`
|
Agents AgentsConfig `json:"llm"`
|
||||||
EvidenceDescriber EvidenceDescriberConfig `json:"evidence-describer"`
|
EvidenceDescriber EvidenceDescriberConfig `json:"evidence-describer"`
|
||||||
ChromeDPAddr string `json:"chrome-dp-addr"`
|
ChromeDPAddr string `json:"chrome-dp-addr"`
|
||||||
Firecrawl FirecrawlConfig `json:"firecrawl"`
|
|
||||||
CustomDomains CustomDomainsConfig `json:"custom-domains"`
|
CustomDomains CustomDomainsConfig `json:"custom-domains"`
|
||||||
SCIMBridge SCIMBridgeConfig `json:"scim-bridge"`
|
SCIMBridge SCIMBridgeConfig `json:"scim-bridge"`
|
||||||
ESign ESignConfig `json:"esign"`
|
ESign ESignConfig `json:"esign"`
|
||||||
|
|||||||
@@ -40,6 +40,12 @@ type (
|
|||||||
MaxConcurrency int `json:"max-concurrency"`
|
MaxConcurrency int `json:"max-concurrency"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AgentToolsConfig holds API keys and settings for external tools
|
||||||
|
// that agents can use (web search, scraping, etc.).
|
||||||
|
AgentToolsConfig struct {
|
||||||
|
FirecrawlAPIKey string `json:"firecrawl-api-key"`
|
||||||
|
}
|
||||||
|
|
||||||
// AgentsConfig groups LLM provider credentials and per-agent model
|
// AgentsConfig groups LLM provider credentials and per-agent model
|
||||||
// settings. Default is used as a fallback when an agent-specific field
|
// settings. Default is used as a fallback when an agent-specific field
|
||||||
// is zero-valued.
|
// is zero-valued.
|
||||||
@@ -50,6 +56,7 @@ type (
|
|||||||
EvidenceDescriber LLMAgentConfig `json:"evidence-describer"`
|
EvidenceDescriber LLMAgentConfig `json:"evidence-describer"`
|
||||||
ThirdPartyAssessor LLMAgentConfig `json:"third-party-assessor"`
|
ThirdPartyAssessor LLMAgentConfig `json:"third-party-assessor"`
|
||||||
TrackerMapping LLMAgentConfig `json:"tracker-mapping"`
|
TrackerMapping LLMAgentConfig `json:"tracker-mapping"`
|
||||||
|
Tools AgentToolsConfig `json:"tools"`
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user