feat(cli): add cost estimation per provider for Goose CLI (#3330)

Co-authored-by: Chaitanya Rahalkar <chaitanyarahalkar4@gmail.com>
This commit is contained in:
Gary Zhou
2025-07-11 14:54:45 -04:00
committed by GitHub
parent 4ba991e52e
commit c45e0ef62d
3 changed files with 98 additions and 0 deletions

View File

@@ -153,6 +153,7 @@ These variables control how Goose handles [tool permissions](/docs/guides/managi
| `GOOSE_TOOLSHIM_OLLAMA_MODEL` | Specifies the model for [tool call interpretation](/docs/experimental/ollama) | Model name (e.g. llama3.2, qwen2.5) | System default |
| `GOOSE_CLI_MIN_PRIORITY` | Controls verbosity of [tool output](/docs/guides/managing-tools/adjust-tool-output) | Float between 0.0 and 1.0 | 0.0 |
| `GOOSE_CLI_TOOL_PARAMS_TRUNCATION_MAX_LENGTH` | Maximum length for tool parameter values before truncation in CLI output (not in debug mode) | Integer | 40 |
| `GOOSE_CLI_SHOW_COST` | Toggles display of model cost estimates in CLI output | "true", "1" (case insensitive) to enable | false |
**Examples**
@@ -163,6 +164,9 @@ export GOOSE_TOOLSHIM_OLLAMA_MODEL=llama3.2
export GOOSE_MODE="auto"
export GOOSE_CLI_MIN_PRIORITY=0.2 # Show only medium and high importance output
export GOOSE_CLI_TOOL_PARAMS_MAX_LENGTH=100 # Show up to 100 characters for tool parameters in CLI output
# Enable model cost display in CLI
export GOOSE_CLI_SHOW_COST=true
```
### Enhanced Code Editing