aKode fase 5: rinomina interna (crate akode-*, akode-rs/, akode-cli/, binario akode, AKODE_*, ~/.akode, snapshot)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
andrea.difonzo
2026-11-11 11:06:46 +01:00
parent df99318392
commit 86e7c72e5f
10383 changed files with 749164 additions and 749170 deletions

View File

@@ -0,0 +1,21 @@
//! Returns literal model instructions from the captured model metadata.
//! Missing templates produce a warning; supplied empty templates remain valid input.
use crate::ResolvedModelMessages;
use akode_protocol::openai_models::ModelInfo;
/// Renders base instructions from the caller's captured model, retaining missing-template warnings.
pub fn render_model_instructions(model_info: &ModelInfo) -> String {
let template = ResolvedModelMessages::from_model(model_info).instructions_template();
if template.is_none() {
tracing::warn!(
model = %model_info.slug,
"Model has no instruction template; returning empty instructions."
);
}
template.unwrap_or_default().to_owned()
}
#[cfg(test)]
#[path = "model_instructions_tests.rs"]
mod tests;