Entropic 2.14.3
Local-first agentic inference engine
Loading...
Searching...
No Matches
validate.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
13#pragma once
14
17#include <string>
18#include <vector>
19
20namespace entropic::config {
21
33ENTROPIC_EXPORT std::string validate(const ModelConfig& config);
34
45ENTROPIC_EXPORT std::string validate(const ModelsConfig& config);
46
59ENTROPIC_EXPORT std::string validate(const CompactionConfig& config);
60
73ENTROPIC_EXPORT std::string validate_routing(
74 const RoutingConfig& routing,
75 const ModelsConfig& models);
76
87ENTROPIC_EXPORT std::string validate(const PromptCacheConfig& config);
88
100ENTROPIC_EXPORT std::string validate_config(
101 const ParsedConfig& config,
102 std::vector<std::string>& warnings);
103
111ENTROPIC_EXPORT std::string validate_allowed_tools(
112 const std::vector<std::string>& tools);
113
122ENTROPIC_EXPORT std::string validate_fallback_tier(
123 const std::string& fallback,
124 const std::unordered_map<std::string, TierConfig>& tiers);
125
134ENTROPIC_EXPORT std::string validate_tier_map(
135 const std::unordered_map<std::string, std::string>& tier_map,
136 const std::unordered_map<std::string, TierConfig>& tiers);
137
146ENTROPIC_EXPORT std::string validate_handoff_rules(
147 const std::unordered_map<std::string, std::vector<std::string>>& rules,
148 const std::unordered_map<std::string, TierConfig>& tiers);
149
158ENTROPIC_EXPORT std::string warn_auto_chain_without_targets(
159 const std::unordered_map<std::string, TierConfig>& tiers,
160 const std::unordered_map<std::string, std::vector<std::string>>& handoff_rules);
161
178ENTROPIC_EXPORT std::vector<std::filesystem::path> grammar_search_paths(
179 const ParsedConfig& config,
180 const std::filesystem::path& data_dir);
181
216ENTROPIC_EXPORT std::string warn_unresolved_tier_grammars(
217 const ParsedConfig& config,
218 const std::vector<std::filesystem::path>& search_dirs);
219
220} // namespace entropic::config
Configuration structs with defaults.
Symbol visibility macro for all exported symbols.
ENTROPIC_EXPORT std::string validate_handoff_rules(const std::unordered_map< std::string, std::vector< std::string > > &rules, const std::unordered_map< std::string, TierConfig > &tiers)
Check all handoff_rules keys and values exist in tiers.
Definition validate.cpp:187
ENTROPIC_EXPORT std::string validate_routing(const RoutingConfig &routing, const ModelsConfig &models)
Validate RoutingConfig against defined tiers.
Definition validate.cpp:241
ENTROPIC_EXPORT std::string validate_tier_map(const std::unordered_map< std::string, std::string > &tier_map, const std::unordered_map< std::string, TierConfig > &tiers)
Check all tier_map values exist in tiers.
Definition validate.cpp:166
ENTROPIC_EXPORT std::string validate_config(const ParsedConfig &config, std::vector< std::string > &warnings)
Validate the full ParsedConfig.
Definition validate.cpp:482
ENTROPIC_EXPORT std::string warn_unresolved_tier_grammars(const ParsedConfig &config, const std::vector< std::filesystem::path > &search_dirs)
Warn about a tier whose grammar: stem resolves to no .gbnf (gh#154).
Definition validate.cpp:443
ENTROPIC_EXPORT std::string validate_fallback_tier(const std::string &fallback, const std::unordered_map< std::string, TierConfig > &tiers)
Check fallback_tier exists in tiers.
Definition validate.cpp:148
ENTROPIC_EXPORT std::string warn_auto_chain_without_targets(const std::unordered_map< std::string, TierConfig > &tiers, const std::unordered_map< std::string, std::vector< std::string > > &handoff_rules)
Warn if tier has auto_chain but no handoff_rules entry.
Definition validate.cpp:276
ENTROPIC_EXPORT std::string validate(const ModelConfig &config)
Validate a ModelConfig.
Definition validate.cpp:47
ENTROPIC_EXPORT std::string validate_allowed_tools(const std::vector< std::string > &tools)
Validate allowed_tools entries use "server.tool" format.
Definition validate.cpp:28
ENTROPIC_EXPORT std::vector< std::filesystem::path > grammar_search_paths(const ParsedConfig &config, const std::filesystem::path &data_dir)
The directories a bare grammar stem is looked up in (gh#154).
Definition validate.cpp:370