on main help sign in
chore: use :exacto in openrouter for supported models
commit232fa9ab879f6c7042797ff208f0f08cb907fcc4 authorkujtimiihoxha <kujtimii.h@gmail.com> dateThu 23 Oct 2025, 22:53 (1 year ago) parent231c3d9
1 file changed+19
internal/agent/coordinator.go+19
internal/agent/coordinator.go+19
@@ -405,6 +405,14 @@ func (c *coordinator) buildAgentModels(ctx context.Context) (Model, Model, error
405405 largeModelID := largeModelCfg.Model
406406 smallModelID := smallModelCfg.Model
407407
408+ if largeModelCfg.Provider == openrouter.Name && isExactoSupported(largeModelID) {
409+ largeModelID += ":exacto"
410+ }
411+
412+ if smallModelCfg.Provider == openrouter.Name && isExactoSupported(smallModelID) {
413+ smallModelID += ":exacto"
414+ }
415+
408416 // FIXME(@andreynering): Temporary fix to get it working.
409417 // We need to prefix the model with with `{region}.`
410418 if largeModelCfg.Provider == bedrock.Name {
@@ -637,6 +645,17 @@ func (c *coordinator) buildProvider(providerCfg config.ProviderConfig, model con
637645 }
638646}
639647
648+func isExactoSupported(modelID string) bool {
649+ supportedModels := []string{
650+ "moonshotai/kimi-k2-0905",
651+ "deepseek/deepseek-v3.1-terminus",
652+ "z-ai/glm-4.6",
653+ "openai/gpt-oss-120b",
654+ "qwen/qwen3-coder",
655+ }
656+ return slices.Contains(supportedModels, modelID)
657+}
658+
640659func (c *coordinator) Cancel(sessionID string) {
641660 c.currentAgent.Cancel(sessionID)
642661}