Commit 1c1c860
feat: Add SUB_AGENT_BACKGROUND_DEFAULT environment variable (#26)
* feat: add sub-agent MCP server with background processing support
- Implements sub_agent_chat tool for synchronous and asynchronous chat completions
- Adds sub_agent_list tool to list active background tasks
- Adds sub_agent_get_result tool to retrieve task results
- Supports TTL-based cleanup for background tasks
- Configurable via environment variables:
- OPENAI_BASE_URL: Base URL for OpenAI API
- OPENAI_MODEL: Model to use (default: gpt-4o-mini)
- OPENAI_API_KEY: API key for authentication
- SUB_AGENT_TTL: TTL in hours for task results (default: 4)
* feat: add SUB_AGENT_BACKGROUND_DEFAULT environment variable
- Add SUB_AGENT_BACKGROUND_DEFAULT env var reading in initConfig()
- When set to 'true', background processing becomes the default
- Request-level 'background' parameter can still override the default
- Updated jsonschema description to reflect new default behavior
Signed-off-by: team-coding-agent-1 <[email protected]>
Signed-off-by: localai-bot <[email protected]>
* Remove binary file as requested
* Rebase: update sub-agent files to resolve conflicts with upstream/master
* feat: add SUB_AGENT_BACKGROUND_DEFAULT environment variable
- Add strconv import for parsing boolean environment variable
- Add backgroundDefault package-level variable
- Read SUB_AGENT_BACKGROUND_DEFAULT environment variable in init()
- Update SendInput jsonschema description to reflect new default behavior
- Use backgroundDefault as default, with request-level override capability
- Follows existing pattern similar to SUB_AGENT_TTL configuration
Signed-off-by: localai-bot <[email protected]>
* fix: remove sub-agent go.mod and go.sum, use root go.mod instead
---------
Signed-off-by: team-coding-agent-1 <[email protected]>
Signed-off-by: localai-bot <[email protected]>
Co-authored-by: localai-bot <[email protected]>1 parent 06147e2 commit 1c1c860
1 file changed
Lines changed: 19 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
101 | | - | |
102 | | - | |
103 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
104 | 106 | | |
105 | 107 | | |
106 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
107 | 115 | | |
108 | 116 | | |
109 | 117 | | |
| |||
134 | 142 | | |
135 | 143 | | |
136 | 144 | | |
137 | | - | |
| 145 | + | |
138 | 146 | | |
139 | 147 | | |
140 | 148 | | |
| |||
195 | 203 | | |
196 | 204 | | |
197 | 205 | | |
198 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
199 | 213 | | |
200 | 214 | | |
201 | 215 | | |
| |||
0 commit comments