Add provider for-tools command and max_tokens support

- Add 'cmdforge providers for-tools <tool>...' to list providers used by tools
- Add --warm flag to pre-load local models (Ollama) for faster first inference
- Warm larger models first to claim contiguous GPU memory
- Skip cloud providers (claude, opencode, gemini) during warm-up
- Add max_tokens field to PromptStep for controlling output length
- Pass max_tokens to call_provider with provider-specific flags
- Add comprehensive tests for provider functionality

Co-Authored-By: Claude Opus 4.5 <[email protected]>
This commit is contained in:
rob
2026-04-04 17:50:26 -03:00
co-authored by Claude Opus 4.5
parent 468a999b80
commit b673ea019c
6 changed files with 280 additions and 14 deletions
+2 -2
View File
@@ -546,7 +546,7 @@ def execute_prompt_step(
if provider.lower() == "mock":
result = mock_provider(prompt)
else:
result = call_provider(provider, prompt)
result = call_provider(provider, prompt, max_tokens=step.max_tokens)
if not result.success:
print(f"Error in prompt step: {result.error}", file=sys.stderr)
@@ -590,7 +590,7 @@ Please try again with valid JSON matching the schema exactly."""
if provider.lower() == "mock":
result = mock_provider(current_prompt)
else:
result = call_provider(provider, current_prompt)
result = call_provider(provider, current_prompt, max_tokens=step.max_tokens)
if not result.success:
print(f"Error in prompt step: {result.error}", file=sys.stderr)