Skip to content

feat(config): move the tools policy into a protected userspace tools.yaml - #1507

Merged
edenreich merged 13 commits into
mainfrom
fix/issue-1501
Oct 2, 2026
Merged

edenreich merged 13 commits into
mainfrom
fix/issue-1501

Conversation

@inference-gateway-maintainer

@inference-gateway-maintainer inference-gateway-maintainer Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Resolves #1501

Summary

Moves the whole tools: section out of config.yaml into a userspace-only ~/.infer/tools.yaml that infer's file tools and infer config set never write, the same way sandbox.yaml already works. Nothing that decides whether a tool needs approval can be flipped by a single approved file write or by a project .infer/config.yaml any more. This unblocks the /config skill (#1499), whose prerequisite this is. #1502 remains open for sidecar reload in chat.

Changes

  • config/tools.go (new): ToolsFileName, DefaultToolsConfig(), LoadTools via configutils.LoadYAMLMerged, SaveTools and UserToolsPath(), mirroring config/sandbox.go. tools.yaml opens with the keys that apply to every tool (enabled, custom_dir, max_result_bytes, safety) and holds each tool's section under tools:. ToolsConfig keeps its flat Go shape (a small YAML codec does the nesting), so cfg.Tools.Bash, the INFER_TOOLS_* names and config get tools.bash stay the same.
  • Config.Tools is now yaml:"-" mapstructure:"-". The runtime loads it from ~/.infer/tools.yaml only, next to loadSandboxConfig. A tools: block in any config.yaml and a project .infer/tools.yaml have no effect.
  • INFER_TOOLS_* env overrides keep working through applySidecarEnv(&cfg.Tools, "tools"). Like the other sidecars, a set-but-empty INFER_TOOLS_* value now wins (for example INFER_TOOLS_WEB_FETCH_ALLOWED_DOMAINS= empties the list).
  • The --tools-bash-allow-append flag and INFER_TOOLS_BASH_ALLOW_APPEND env append directly onto the loaded tools config instead of a viper key.
  • sandbox.ValidateWrite refuses ~/.infer/tools.yaml unconditionally, in the same message style as sandbox.yaml. The guard is one list of protected policy files.
  • infer config set tools.* fails with an error naming tools.yaml. infer config get tools.bash still prints the effective value (the tools section is injected into the get dump).
  • infer init seeds tools.yaml from the defaults exactly like sandbox.yaml, and --overwrite regenerates it.
  • Docs: configuration-reference.md gets a tools.yaml sample under Tool Settings in place of the tools: block in the config.yaml sample. The tools-reference.md and scheduling.md examples are tools.yaml snippets in the same layout. custom-tools.md no longer says a project config can set the approval policy. tool-approval.md, directory-structure.md, commands-reference.md and examples/basic/README.md drop the infer config set tools.* examples.

Docs follow-up

inference-gateway/docs#914 updates cli.md and cli-judge-mode.md, which still show infer config set tools.*.

…yaml

The tools section decides whether a tool needs approval, so it gets the sandbox.yaml treatment: its own userspace file that no config.yaml layer can carry. ToolsFileName, DefaultToolsConfig, LoadTools, SaveTools and UserToolsPath land in config/tools.go mirroring config/sandbox.go, DefaultConfig() pulls from DefaultToolsConfig(), and the Config.Tools field drops out of config.yaml round-trips.

The config package round-trip tests now pin the new invariant: a tools: block in config.yaml is ignored, and tools settings are not written back into it.
@edenreich

Copy link
Copy Markdown
Contributor

@infer /model deepseek/deepseek-v4-pro can you finalise this PR? finish the todos and make it ready for review? use /cobra-viper /go

@inference-gateway-maintainer

inference-gateway-maintainer Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Model: deepseek/deepseek-v4-pro · View Job

Todos

  • Investigate existing sandbox.yaml protection, config get/set, and init code
  • Protect tools.yaml in sandbox.ValidateWrite (generalize protected policy file list)
  • Make infer config set tools.* fail; keep get tools.bash effective
  • Seed tools.yaml + migrate legacy tools: block in infer init
  • Update docs (configuration-reference, tool-approval, directory-structure, commands-reference, README)
  • Run precommit + tests, fix failures, commit and push

Pull Request

#1507

✅ Infer Result: Success

The PR is now finalized and pushed. All acceptance criteria from #1501 are implemented and the full test suite passes (task test, task precommit:run, markdownlint).

What I completed

The original diff covered the core split (config/tools.go, Config.Tools dropped out of config.yaml, env overrides). I finished the remaining todos:

1. Protected tools.yaml from the file tools (internal/sandbox/paths.go)

  • Generalized isSandboxPolicyFile into a protectedPolicyFiles() list (sandbox + tools) plus a protectedPolicyPath lookup that returns the matching label.
  • ValidateWrite now refuses both policy files with the same message style. The Bash path gate routes write-path checks through ValidateWrite (for mkdir/ln), so it inherits the guard.
  • Added TestValidateWrite_ToolsPolicyFile.

2. infer config set/get behavior (cmd/config/getset.go)

  • setConfigValue rejects any tools/tools.* key with an error naming tools.yaml.
  • getConfigValue now injects the effective tools section into the get dump (injectTools), so infer config get tools.bash keeps working.
  • Updated help text and getset_test.go (tools keys resolve as unknown; new TestSetConfigValueRejectsToolsKeys and TestInjectTools).

3. infer init seeding + migration (cmd/init/init.go)

  • Added createToolsConfigFile, which seeds ~/.infer/tools.yaml from defaults, migrates a legacy tools: block from config.yaml once, and never clobbers an existing tools.yaml.
  • Added TestCreateToolsConfigFileMigratesAndDoesNotClobber and included tools.yaml in TestInitializeProject.

4. Docs (configuration-reference.md, commands-reference.md, directory-structure.md, tool-approval.md)

  • Removed/replaced the now-invalid infer config set tools.* examples and pointed tool configuration at ~/.infer/tools.yaml.

Commits

  • feat(sandbox): refuse writes to the tools.yaml policy
  • feat(config): reject tools.* in config set, show it in config get
  • feat(init): seed tools.yaml and migrate the legacy tools block
  • docs(config): document the tools.yaml policy and config set/get behaviour
  • test(config): pin the get tools.* injection

Working tree is clean and fix/issue-1501 is pushed (CI's pending test check should now run against the finished change set).

Model: deepseek/deepseek-v4-pro · Exit Code: 0 · Duration: 12m 32s

Tokens: 13,186,562 in · 45,265 out · 13,231,827 total (54 requests)

Cost: $0.4359 in · $0.0394 out · $0.4753 total

Tool calls: 105 total · 100% success rate

Traces
Session: 1790976074-ec3bcdef

session (headless, success)                                                                   12m25s
├── chat deepseek/deepseek-v4-pro                                                               2.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   2.9s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     2.8s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         2.8s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          2.8s
├── execute_tool Read call_00_6q3rRVZ3RV0OgUfy1HP02063                                         313µs
├── execute_tool Read call_01_v0Tjcb2pqykZrRZENNa83324                                         208µs
├── execute_tool Bash call_02_K0VRIqNuKWOx5Uc0y2co6010                                           7ms
├── execute_tool Bash call_03_ZpWrVk2dwsnnwQzxVSLK9927                                           3ms
├── chat deepseek/deepseek-v4-pro                                                               2.5s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   2.5s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     2.5s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         2.5s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          2.5s
├── execute_tool Bash call_00_eXBGYRT8Hcwqwyo9MogJ4213                                           5ms
├── execute_tool Bash call_01_mwn1LAixGZI3iVLCW5tj0428                                           5ms
├── chat deepseek/deepseek-v4-pro                                                               9.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   9.1s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     9.1s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         9.1s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          9.1s
├── execute_tool Bash call_00_OieK9QVY6pdGChKtGTqP1693                                         791ms
├── execute_tool Bash call_01_Ld6tjp4XuZ39q6ORP7ZX2189                                          1.6s
├── chat deepseek/deepseek-v4-pro                                                               7.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   7.1s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     7.1s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         7.1s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          7.1s
├── execute_tool TodoWrite call_00_ZNLuI6Z3aQgq1M4cbs3Z9169                                     86µs
├── execute_tool Read call_03_4xDGdkxrDLkLUyq4Y1ub1133                                         367µs
├── execute_tool Read call_02_uuWZvuInFYdArM4k7TKQ9014                                         348µs
├── execute_tool Read call_01_4nw6eZkavcD6Vw7wQtEl6561                                         451µs
├── execute_tool Read call_04_hD64Q4DAX1QeM1hFeMMD4513                                         479µs
├── chat deepseek/deepseek-v4-pro                                                              12.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                  12.2s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]    12.2s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                        12.2s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]         12.2s
├── execute_tool Read call_01_nB7Y6BV10831R9Xyeje00423                                         279µs
├── execute_tool Read call_00_UyoMAnIM2aNv6qCPpmiH1057                                         355µs
├── execute_tool Bash call_02_cbPBDD7ZciwLKP9BaNeq8458                                           2ms
├── execute_tool Bash call_03_6Wls68hg6igO5PGkLXKi0250                                           2ms
├── chat deepseek/deepseek-v4-pro                                                               4.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   4.9s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     4.9s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         4.9s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          4.9s
├── execute_tool Read call_01_l9QYLOkJeOu8tQP7g8xF4473                                         320µs
├── execute_tool Read call_00_lfTUB84ToQefnYyAhKgz3304                                         282µs
├── chat deepseek/deepseek-v4-pro                                                              40.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                  40.0s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]    39.9s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                        39.9s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]         39.9s
├── execute_tool Grep call_02_M49OMqawo5lPtbdQ0CLH5720                                         928ms
├── execute_tool Grep call_00_CNW98qQ835eGFXxWIuvn4166                                          40ms
├── execute_tool Grep call_01_FU3LQXAIjL8KA23xkyi78225                                           2ms
├── chat deepseek/deepseek-v4-pro                                                               7.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   7.1s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     7.1s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         7.1s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          7.1s
├── execute_tool Read call_00_XaRemBjgtgeBXmzCPd292763                                         400µs
├── execute_tool Read call_01_XONiTXjDKQGjC3NDrlbb2796                                         303µs
├── execute_tool Bash call_02_GzQVi9DFdlOhPeh0Dpg52634                                           2ms
├── chat deepseek/deepseek-v4-pro                                                               5.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   5.0s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     5.0s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         5.0s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          5.0s
├── execute_tool Memory call_00_bBgcUrxEXAnGLL6xFB6o8804                                       127µs
├── execute_tool Memory call_01_zhUc5dyIkl9ajTihSuvQ6957                                       118µs
├── execute_tool Read call_02_jQfPPmNf2Vb2hGMhmfLd1028                                         285µs
├── chat deepseek/deepseek-v4-pro                                                              10.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                  10.4s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]    10.4s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                        10.4s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]         10.4s
├── execute_tool Edit call_00_a4uKNOI60jKnSlzlIlQF6035                                           1ms
├── execute_tool Edit call_01_5NHoixjyyijbc2qxIequ9499                                         837µs
├── chat deepseek/deepseek-v4-pro                                                               8.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   8.0s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     7.9s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         7.9s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          7.9s
├── execute_tool Edit call_00_vSXXduFWEjhnNd7m7BP05419                                         915µs
├── chat deepseek/deepseek-v4-pro                                                               3.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   3.2s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     3.2s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         3.2s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          3.2s
├── execute_tool Bash call_00_YzwdIRD17KqLwTO7k3pv6726                                         13.2s
├── chat deepseek/deepseek-v4-pro                                                               4.7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   4.7s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     4.7s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         4.7s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          4.7s
├── execute_tool TodoWrite call_00_2i6g6iD9vXnGdfdFDdlZ3873                                     71µs
├── execute_tool Bash call_01_H0dN1bQMrO9JeIY4ISsf6199                                           7ms
├── chat deepseek/deepseek-v4-pro                                                               2.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   2.9s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     2.9s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         2.9s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          2.9s
├── execute_tool Bash call_00_G86Gqnb0g1AXOc9L19jr8622                                         1m27s
├── chat deepseek/deepseek-v4-pro                                                               4.5s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   4.5s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     4.5s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         4.5s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          4.5s
├── execute_tool Bash call_00_2yR8jIrfknf426PfoZhc4497                                           6ms
├── chat deepseek/deepseek-v4-pro                                                               3.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   3.1s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     3.1s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         3.1s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          3.1s
├── execute_tool Bash call_00_oIBdXCM791vbNiZf9p6U4114                                          1.5s
├── chat deepseek/deepseek-v4-pro                                                              30.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                  30.8s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]    30.8s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                        30.8s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]         30.8s
├── execute_tool Edit call_00_Lc6xShIAXpAl5BidGn9k2736                                           1ms
├── execute_tool Edit call_01_pC6mgSmCvx18ItaT0NmJ5401                                         856µs
├── execute_tool Edit call_02_CF1dawZh2aK0xIPSDXiQ5847                                         795µs
├── execute_tool Edit call_03_ctVAa5E8hJtkiUvwWbUF0432                                           3ms
├── execute_tool Edit call_04_P3HlQRrOMdxODk2yJa5v6546                                         751µs
├── execute_tool Edit call_05_DnWZCFUCG5V1FwQFnaU88464                                         847µs
├── chat deepseek/deepseek-v4-pro                                                               8.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   8.4s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     8.4s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         8.4s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          8.4s
├── execute_tool Edit call_00_SBxelkELQqydtAjImwyg5469                                         752µs
├── execute_tool Edit call_01_MOFmeeUinyFnCf74mQUi6293                                         765µs
├── execute_tool Edit call_02_PwAPl9a4bJa6pjCt3ggG1354                                         804µs
├── chat deepseek/deepseek-v4-pro                                                               5.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   5.2s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     5.1s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         5.1s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          5.1s
├── execute_tool Read call_00_Sys83pSZjfvS4KcxJgOH5945                                         307µs
├── chat deepseek/deepseek-v4-pro                                                              15.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                  15.3s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]    15.3s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                        15.3s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]         15.3s
├── execute_tool Write call_00_IfepFrTQ47EWfjfnzLds2792                                          1ms
├── chat deepseek/deepseek-v4-pro                                                               3.5s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   3.5s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     3.5s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         3.5s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          3.5s
├── execute_tool Bash call_00_70wgzLb6oZ2pJusBTLhU2523                                          1.8s
├── chat deepseek/deepseek-v4-pro                                                               3.6s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   3.5s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     3.5s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         3.5s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          3.5s
├── execute_tool Bash call_00_UCKh85HDUaBim2gvIA0S8172                                           8ms
├── execute_tool Bash call_01_5Dw4foMNv882ufaohAmD6680                                           6ms
├── chat deepseek/deepseek-v4-pro                                                               3.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   3.2s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     3.2s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         3.2s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          3.2s
├── execute_tool Bash call_00_uSzenuRFVKR9pJzi1Wig0965                                          5.1s
├── chat deepseek/deepseek-v4-pro                                                               3.7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   3.7s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     3.7s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         3.7s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          3.7s
├── execute_tool Bash call_00_pAgRbFZ3qCTyBStjJsx62502                                          1.3s
├── chat deepseek/deepseek-v4-pro                                                              13.5s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                  13.5s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]    13.5s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                        13.5s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]         13.5s
├── execute_tool Read call_00_hSuhZOFeKcZscVewJ7Wn1643                                         617µs
├── chat deepseek/deepseek-v4-pro                                                               7.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   7.9s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     7.8s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         7.8s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          7.8s
├── execute_tool Edit call_00_NzJ06rNoFrdNvxLKNgHM2810                                         992µs
├── execute_tool Edit call_01_YKoFdqJ9sIKyOS4oS4DJ0977                                           1ms
├── chat deepseek/deepseek-v4-pro                                                              11.6s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                  11.5s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]    11.5s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                        11.5s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]         11.5s
├── execute_tool Edit call_00_FgqHrAvWuF15LCG5jF1p2751                                         889µs
├── chat deepseek/deepseek-v4-pro                                                               8.7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   8.7s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     8.6s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         8.6s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          8.6s
├── execute_tool Edit call_00_DIe7wcyLsLcLtLEPA9gU9836                                         937µs
├── execute_tool Edit call_01_5rW0DziRf4xVTlOvaVkR1473                                           1ms
├── chat deepseek/deepseek-v4-pro                                                               9.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   9.2s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     9.2s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         9.2s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          9.2s
├── execute_tool Edit call_00_dUWUWJQdmHHiPptTcdH42508                                         802µs
├── chat deepseek/deepseek-v4-pro                                                               3.8s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   3.8s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     3.7s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         3.7s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          3.7s
├── execute_tool Bash call_00_19zPuGhFpkbmF4NyJLnY2944                                         26.2s
├── chat deepseek/deepseek-v4-pro                                                              14.7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                  14.6s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]    14.6s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                        14.6s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]         14.6s
├── execute_tool Edit call_00_04b1BdKjOYg0cy2nRUnC4717                                          17ms
├── execute_tool Edit call_01_zPb5mQiCJOGQLp5Nwjg00289                                          18ms
├── chat deepseek/deepseek-v4-pro                                                               5.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   5.2s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     5.1s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         5.1s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          5.1s
├── execute_tool Bash call_00_u3fB6rbKNXh9UzRuqeyn9167                                          1.2s
├── chat deepseek/deepseek-v4-pro                                                               5.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   5.9s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     5.8s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         5.8s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          5.8s
├── execute_tool Bash call_00_xdsRE65I9ls8oIoDn15V3942                                           8ms
├── execute_tool Bash call_01_Vrb7ZUvt1rEFC9iYKyUU9078                                           6ms
├── chat deepseek/deepseek-v4-pro                                                               4.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   4.0s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     4.0s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         4.0s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          4.0s
├── execute_tool Bash call_00_z4bmFer1E5DlgEPRf6lQ8939                                          5.0s
├── chat deepseek/deepseek-v4-pro                                                               4.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   4.2s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     4.1s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         4.1s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          4.1s
├── execute_tool Bash call_00_HbnORZqdOtU55QrzBuBo9250                                          1.5s
├── chat deepseek/deepseek-v4-pro                                                               7.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   6.9s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     6.9s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         6.9s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          6.9s
├── execute_tool Read call_01_Axqp4oc5PnXLIfUhtXoF0875                                         429µs
├── execute_tool Read call_00_BpLaD8ZwkHdryhsbIaSm3961                                         416µs
├── execute_tool Read call_03_lZvQs6TgEqgCyGCUazKV0596                                         366µs
├── execute_tool Read call_05_PsHK5MK5FooR1uJS1UY97774                                         248µs
├── execute_tool Read call_02_HZPqCqKnyoZYe4f20G8m9882                                         247µs
├── execute_tool Read call_04_2xFGsBnnT5X2r77hMpqn8552                                         257µs
├── chat deepseek/deepseek-v4-pro                                                               7.6s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   7.6s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     7.5s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         7.5s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          7.5s
├── execute_tool Read call_00_NnEDihmvwHzjpZ2XPD7m8402                                         331µs
├── chat deepseek/deepseek-v4-pro                                                              26.8s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                  26.8s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]    26.7s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                        26.7s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]         26.7s
├── execute_tool Read call_01_kZ02zVZMRr9faqVe7HTW0680                                         351µs
├── execute_tool Read call_00_WAe3bmWZIuTRGaNK3Yro1285                                         305µs
├── chat deepseek/deepseek-v4-pro                                                              13.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                  13.9s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]    13.8s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                        13.8s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]         13.8s
├── execute_tool Edit call_00_rFlR10wSlFvQz7sIkzn81438                                           2ms
├── execute_tool Edit call_01_rgPFCpww0NGjGrGH40Od4132                                           1ms
├── execute_tool Edit call_02_1vnY30g1s7n3ndyWTlPp2817                                           1ms
├── execute_tool Edit call_03_oe14XEy5ZQmOgkPIv6Db1894                                           1ms
├── execute_tool Edit call_04_fntcSun2H7LDRvkeeeYT2468                                           1ms
├── chat deepseek/deepseek-v4-pro                                                              24.6s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                  24.5s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]    24.4s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                        24.4s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]         24.4s
├── execute_tool Edit call_00_hqaXLDd1kO8jffmYIRH07146                                           1ms
├── execute_tool Edit call_01_jrmjETRLOSaC5trW1pl65139                                           3ms
├── execute_tool Edit call_02_bBsZKLuF4TXrXNURkYYs1897                                         898µs
├── execute_tool Edit call_03_ihAn7sLUZvoED0bhMYYg4775                                         958µs
├── execute_tool Edit call_04_92K1dLMMelbPXp7y6feV0272                                         738µs
├── chat deepseek/deepseek-v4-pro                                                              21.7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                  21.6s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]    21.5s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                        21.5s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]         21.5s
├── execute_tool Bash call_00_eqGYSGghcXVv0emmQI0a7890                                         414ms
├── chat deepseek/deepseek-v4-pro                                                               6.6s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   6.5s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     6.4s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         6.4s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          6.4s
├── execute_tool Bash call_00_5jRWuL5udHkS9dDbMROg6732                                          4.7s
├── chat deepseek/deepseek-v4-pro                                                               4.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   4.8s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     4.8s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         4.8s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          4.8s
├── execute_tool Bash call_00_8tG5kE2WUVRlBFqA0jsE8892                                         1m21s
├── chat deepseek/deepseek-v4-pro                                                               6.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   6.2s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     6.1s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         6.1s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          6.1s
├── execute_tool Bash call_00_pFr5jieTRT9qWDQ6m8gy2340                                           7ms
├── chat deepseek/deepseek-v4-pro                                                               5.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   5.2s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     5.1s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         5.1s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          5.1s
├── execute_tool Bash call_00_yVD5AvCFkHlklxjI2zey1069                                           9ms
├── execute_tool Bash call_01_ntQLPeUhxge5A7A4xDtX1344                                          4.6s
├── chat deepseek/deepseek-v4-pro                                                               5.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   5.1s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     5.0s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         5.0s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          5.0s
├── execute_tool Bash call_00_qgJM5ZtTUpoj2es7OY5c2357                                          1.3s
├── chat deepseek/deepseek-v4-pro                                                               6.6s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   6.5s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     6.5s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         6.5s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          6.5s
├── execute_tool Bash call_00_HsN8RhLD7XZ2QHLdExT19904                                           6ms
├── execute_tool Grep call_01_y3nRRuurP8pgRCB5Ra8y8835                                          25ms
├── execute_tool Bash call_02_7Ax3bxlu3U11ZHRLyVzA2639                                           3ms
├── chat deepseek/deepseek-v4-pro                                                               7.7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   7.7s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     7.6s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         7.6s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          7.6s
├── execute_tool Read call_00_hF5bcSTzfrOIxgWK17zk1027                                         353µs
├── chat deepseek/deepseek-v4-pro                                                              19.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                  19.2s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]    19.2s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                        19.2s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]         19.2s
├── execute_tool Edit call_00_ombZOdh6xft3A9P8Q2JA1707                                         804µs
├── execute_tool Edit call_01_uxVsCNgPxIbJENx1pC2C7325                                           3ms
├── chat deepseek/deepseek-v4-pro                                                               6.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   6.2s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     6.2s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         6.2s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          6.2s
├── execute_tool Bash call_00_U3teCQ1MKgjR22utyFBy5130                                         417ms
├── chat deepseek/deepseek-v4-pro                                                               6.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   6.1s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     6.1s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         6.1s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          6.1s
├── execute_tool Bash call_00_W5bnAGUvHyOB3XG8awgx1273                                           7ms
├── execute_tool Bash call_01_KuwE1M6aAOyXoZPI44zo0290                                          4.6s
├── chat deepseek/deepseek-v4-pro                                                               4.5s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   4.4s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     4.4s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         4.4s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          4.4s
├── execute_tool Bash call_00_ET_cBFckqwGz3gZTxuR8DCU4846                                       1.3s
├── chat deepseek/deepseek-v4-pro                                                               4.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                   4.9s
│       ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     4.8s
│           ╰── POST /proxy/:provider/*path [inference-gateway, server]                         4.8s
│               ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          4.8s
├── execute_tool TodoWrite call_00_oUidr7p2RMRW0RS0H1yM6250                                     70µs
╰── chat deepseek/deepseek-v4-pro                                                               9.7s
    ╰── POST /v1/chat/completions [inference-gateway, server]                                   9.6s
        ╰── POST 127.0.0.1:8080/proxy/deepseek/chat/completions [inference-gateway, client]     9.6s
            ╰── POST /proxy/:provider/*path [inference-gateway, server]                         9.6s
                ╰── POST api.deepseek.com/chat/completions [inference-gateway, client]          9.6s
Stats
Tool Calls

╭───────────┬───────┬───────┬────────╮
│ Tool      │ Calls │ Fail% │ Avg    │
├───────────┼───────┼───────┼────────┤
│ Bash      │ 38    │ 0%    │ 6439ms │
│ Edit      │ 32    │ 0%    │ 2ms    │
│ Read      │ 25    │ 0%    │ 346µs  │
│ Grep      │ 4     │ 0%    │ 249ms  │
│ TodoWrite │ 3     │ 0%    │ 69µs   │
│ Memory    │ 2     │ 0%    │ 126µs  │
│ Write     │ 1     │ 0%    │ 1ms    │
╰───────────┴───────┴───────┴────────╯

Token Usage

╭──────────────────────────┬──────────┬──────────┬────────────┬──────────┬────────╮
│ Model                    │ Prompt   │ Cached   │ Completion │ Total    │ Cost   │
├──────────────────────────┼──────────┼──────────┼────────────┼──────────┼────────┤
│ deepseek/deepseek-v4-pro │ 13186562 │ 12286848 │ 45265      │ 13231827 │ $0.475 │
╰──────────────────────────┴──────────┴──────────┴────────────┴──────────┴────────╯

Sessions

╭───────────┬──────────┬──────────╮
│ Execution │ Mode     │ Sessions │
├───────────┼──────────┼──────────┤
│ headless  │ headless │ 1        │
╰───────────┴──────────┴──────────╯

Triggered by edenreich · Infer Action · OSS

@edenreich
edenreich marked this pull request as ready for review October 2, 2026 21:37
@edenreich
edenreich requested a review from a team as a code owner October 2, 2026 21:37
The migration read the layered config, so infer init copied a project
.infer/config.yaml tools block into the userspace tools.yaml. It also only ran
under --overwrite and dropped a block that failed to decode.

tools.yaml is now seeded from the defaults the way sandbox.yaml is, and a
tools: block in config.yaml simply has no effect. The legacy-block warning
goes too, matching the other sidecar files.
DefaultToolsConfig said every tool was enabled, but schedule is off. The doc
comment also ran past five lines, injectTools carried a semicolon and
Config.Tools had a trailing comment its sibling sidecar fields do not.
tools.yaml holds the tools keys at its root, so the examples that wrapped
them in a tools: key would have been silently ignored. The tools block moves
out of the config.yaml samples into its own tools.yaml sample, the custom
tools trust model no longer says a project can set the approval policy, and
the infer config set tools.* examples are gone.
… under tools:

tools.yaml now opens with the keys that apply to every tool (enabled,
custom_dir, max_result_bytes and safety) and holds each tool's section under
tools:. ToolsConfig keeps its flat Go shape, so cfg.Tools.Bash, the
INFER_TOOLS_* names and infer config get tools.bash are unchanged.
The examples put the keys for every tool first and each tool's section under
tools:, matching the file infer init seeds.
@edenreich
edenreich merged commit dc014c2 into main Oct 2, 2026
1 check passed
@edenreich
edenreich deleted the fix/issue-1501 branch October 2, 2026 22:31
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.223.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Move tools config to a protected userspace tools.yaml

1 participant