Unified Agent + reusable Go agent core.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix conflict

Lyric 69e8c3f1 39f366c0

+163 -168
+1 -1
cmd/mistermorph/chatcmd/repl.go
··· 14 14 "github.com/chzyer/readline" 15 15 "github.com/quailyquaily/mistermorph/agent" 16 16 "github.com/quailyquaily/mistermorph/internal/chatcommands" 17 - "github.com/quailyquaily/mistermorph/internal/pathroots" 18 17 "github.com/quailyquaily/mistermorph/internal/llmstats" 19 18 "github.com/quailyquaily/mistermorph/internal/outputfmt" 19 + "github.com/quailyquaily/mistermorph/internal/pathroots" 20 20 "github.com/quailyquaily/mistermorph/llm" 21 21 ) 22 22
+45 -45
cmd/mistermorph/chatcmd/session.go
··· 34 34 ) 35 35 36 36 type chatSession struct { 37 - cmd *cobra.Command 38 - deps Dependencies 39 - logger *slog.Logger 40 - logOpts agent.LogOptions 41 - client llm.Client 42 - mainCfg llmconfig.ClientConfig 43 - engine *agent.Engine 44 - toolRegistry *tools.Registry 45 - runtimeToolsCfg toolsutil.RuntimeToolsRegisterConfig 46 - memManager *memory.Manager 47 - memOrchestrator *memoryruntime.Orchestrator 48 - memWorker *memoryruntime.ProjectionWorker 49 - memCleanup func() 50 - subjectID string 51 - compactMode bool 52 - userName string 53 - agentName string 54 - launchDir string 55 - fileCacheDir string 56 - workspaceDir string 57 - sessionStore *llmselect.Store 58 - llmValues llmutil.RuntimeValues 59 - buildClient func(llmutil.ResolvedRoute, *llmconfig.ClientConfig) (llm.Client, error) 60 - makeEngine func(*tools.Registry, llm.Client, string) *agent.Engine 61 - basePromptSpec agent.PromptSpec 62 - promptSpec agent.PromptSpec 63 - timeout time.Duration 64 - writer io.Writer 65 - uiMu sync.Mutex 66 - stopAnim func() 67 - setAnimMessage func(string) 37 + cmd *cobra.Command 38 + deps Dependencies 39 + logger *slog.Logger 40 + logOpts agent.LogOptions 41 + client llm.Client 42 + mainCfg llmconfig.ClientConfig 43 + engine *agent.Engine 44 + toolRegistry *tools.Registry 45 + runtimeToolsCfg toolsutil.RuntimeToolsRegisterConfig 46 + memManager *memory.Manager 47 + memOrchestrator *memoryruntime.Orchestrator 48 + memWorker *memoryruntime.ProjectionWorker 49 + memCleanup func() 50 + subjectID string 51 + compactMode bool 52 + userName string 53 + agentName string 54 + launchDir string 55 + fileCacheDir string 56 + workspaceDir string 57 + sessionStore *llmselect.Store 58 + llmValues llmutil.RuntimeValues 59 + buildClient func(llmutil.ResolvedRoute, *llmconfig.ClientConfig) (llm.Client, error) 60 + makeEngine func(*tools.Registry, llm.Client, string) *agent.Engine 61 + basePromptSpec agent.PromptSpec 62 + promptSpec agent.PromptSpec 63 + timeout time.Duration 64 + writer io.Writer 65 + uiMu sync.Mutex 66 + stopAnim func() 67 + setAnimMessage func(string) 68 68 } 69 69 70 70 func cloneToolRegistry(base *tools.Registry) *tools.Registry { ··· 478 478 memCleanup() 479 479 } 480 480 }, 481 - subjectID: subjectID, 482 - compactMode: compactMode, 483 - userName: userName, 484 - agentName: agentName, 485 - sessionStore: sessionStore, 486 - llmValues: llmValues, 487 - buildClient: buildClient, 488 - makeEngine: makeEngine, 489 - launchDir: launchDir, 490 - fileCacheDir: fileCacheDir, 491 - workspaceDir: workspaceDir, 492 - basePromptSpec: promptSpec, 493 - promptSpec: promptSpec, 494 - timeout: timeout, 481 + subjectID: subjectID, 482 + compactMode: compactMode, 483 + userName: userName, 484 + agentName: agentName, 485 + sessionStore: sessionStore, 486 + llmValues: llmValues, 487 + buildClient: buildClient, 488 + makeEngine: makeEngine, 489 + launchDir: launchDir, 490 + fileCacheDir: fileCacheDir, 491 + workspaceDir: workspaceDir, 492 + basePromptSpec: promptSpec, 493 + promptSpec: promptSpec, 494 + timeout: timeout, 495 495 } 496 496 sess.rebuildPromptSpec() 497 497 sess.engine = sess.makeEngine(sess.toolRegistry, sess.client, sess.mainCfg.Model)
+2 -2
cmd/mistermorph/consolecmd/runtime_config.go
··· 14 14 ) 15 15 16 16 const ( 17 - consoleRuntimeEnvPrefix = "MISTER_MORPH" 18 - consoleConfigPollInterval = time.Second 17 + consoleRuntimeEnvPrefix = "MISTER_MORPH" 18 + consoleConfigPollInterval = time.Second 19 19 ) 20 20 21 21 type consoleRuntimeOverrides map[string]any
+76 -76
cmd/mistermorph/consolecmd/runtime_support.go
··· 22 22 ) 23 23 24 24 type consoleRegistryConfig struct { 25 - UserAgent string 26 - SecretsAllowProfiles []string 27 - AuthProfiles map[string]secrets.AuthProfile 28 - FileCacheDir string 29 - FileStateDir string 30 - ToolsReadFileMaxBytes int64 31 - ToolsReadFileDenyPaths []string 32 - ToolsWriteFileEnabled bool 33 - ToolsWriteFileMaxBytes int 34 - ToolsBashEnabled bool 35 - ToolsBashTimeout time.Duration 36 - ToolsBashMaxOutputBytes int 37 - ToolsBashDenyPaths []string 38 - ToolsBashInjectedEnvVars []string 39 - ToolsPowerShellEnabled bool 40 - ToolsPowerShellTimeout time.Duration 41 - ToolsPowerShellMaxOutputBytes int 42 - ToolsPowerShellDenyPaths []string 25 + UserAgent string 26 + SecretsAllowProfiles []string 27 + AuthProfiles map[string]secrets.AuthProfile 28 + FileCacheDir string 29 + FileStateDir string 30 + ToolsReadFileMaxBytes int64 31 + ToolsReadFileDenyPaths []string 32 + ToolsWriteFileEnabled bool 33 + ToolsWriteFileMaxBytes int 34 + ToolsBashEnabled bool 35 + ToolsBashTimeout time.Duration 36 + ToolsBashMaxOutputBytes int 37 + ToolsBashDenyPaths []string 38 + ToolsBashInjectedEnvVars []string 39 + ToolsPowerShellEnabled bool 40 + ToolsPowerShellTimeout time.Duration 41 + ToolsPowerShellMaxOutputBytes int 42 + ToolsPowerShellDenyPaths []string 43 43 ToolsPowerShellInjectedEnvVars []string 44 - ToolsURLFetchEnabled bool 45 - ToolsURLFetchTimeout time.Duration 46 - ToolsURLFetchMaxBytes int64 47 - ToolsURLFetchMaxBytesDownload int64 48 - ToolsWebSearchEnabled bool 49 - ToolsWebSearchTimeout time.Duration 50 - ToolsWebSearchMaxResults int 51 - ToolsWebSearchBaseURL string 52 - ToolsContactsSendEnabled bool 53 - ContactsDir string 54 - TelegramBotToken string 55 - TelegramBaseURL string 56 - SlackBotToken string 57 - SlackBaseURL string 58 - LineChannelAccessToken string 59 - LineBaseURL string 60 - LarkAppID string 61 - LarkAppSecret string 62 - LarkBaseURL string 63 - ContactsFailureCooldown time.Duration 44 + ToolsURLFetchEnabled bool 45 + ToolsURLFetchTimeout time.Duration 46 + ToolsURLFetchMaxBytes int64 47 + ToolsURLFetchMaxBytesDownload int64 48 + ToolsWebSearchEnabled bool 49 + ToolsWebSearchTimeout time.Duration 50 + ToolsWebSearchMaxResults int 51 + ToolsWebSearchBaseURL string 52 + ToolsContactsSendEnabled bool 53 + ContactsDir string 54 + TelegramBotToken string 55 + TelegramBaseURL string 56 + SlackBotToken string 57 + SlackBaseURL string 58 + LineChannelAccessToken string 59 + LineBaseURL string 60 + LarkAppID string 61 + LarkAppSecret string 62 + LarkBaseURL string 63 + ContactsFailureCooldown time.Duration 64 64 } 65 65 66 66 func loadConsoleRegistryConfigFromViper() consoleRegistryConfig { ··· 80 80 81 81 fileStateDir := strings.TrimSpace(r.GetString("file_state_dir")) 82 82 return consoleRegistryConfig{ 83 - UserAgent: strings.TrimSpace(r.GetString("user_agent")), 84 - SecretsAllowProfiles: append([]string(nil), r.GetStringSlice("secrets.allow_profiles")...), 85 - AuthProfiles: copyConsoleAuthProfilesMap(authProfiles), 86 - FileCacheDir: strings.TrimSpace(r.GetString("file_cache_dir")), 87 - FileStateDir: fileStateDir, 88 - ToolsReadFileMaxBytes: int64(r.GetInt("tools.read_file.max_bytes")), 89 - ToolsReadFileDenyPaths: append([]string(nil), r.GetStringSlice("tools.read_file.deny_paths")...), 90 - ToolsWriteFileEnabled: r.GetBool("tools.write_file.enabled"), 91 - ToolsWriteFileMaxBytes: r.GetInt("tools.write_file.max_bytes"), 92 - ToolsBashEnabled: r.GetBool("tools.bash.enabled"), 93 - ToolsBashTimeout: r.GetDuration("tools.bash.timeout"), 94 - ToolsBashMaxOutputBytes: r.GetInt("tools.bash.max_output_bytes"), 95 - ToolsBashDenyPaths: append([]string(nil), r.GetStringSlice("tools.bash.deny_paths")...), 96 - ToolsBashInjectedEnvVars: append([]string(nil), r.GetStringSlice("tools.bash.injected_env_vars")...), 97 - ToolsPowerShellEnabled: r.GetBool("tools.powershell.enabled"), 98 - ToolsPowerShellTimeout: r.GetDuration("tools.powershell.timeout"), 99 - ToolsPowerShellMaxOutputBytes: r.GetInt("tools.powershell.max_output_bytes"), 100 - ToolsPowerShellDenyPaths: append([]string(nil), r.GetStringSlice("tools.powershell.deny_paths")...), 83 + UserAgent: strings.TrimSpace(r.GetString("user_agent")), 84 + SecretsAllowProfiles: append([]string(nil), r.GetStringSlice("secrets.allow_profiles")...), 85 + AuthProfiles: copyConsoleAuthProfilesMap(authProfiles), 86 + FileCacheDir: strings.TrimSpace(r.GetString("file_cache_dir")), 87 + FileStateDir: fileStateDir, 88 + ToolsReadFileMaxBytes: int64(r.GetInt("tools.read_file.max_bytes")), 89 + ToolsReadFileDenyPaths: append([]string(nil), r.GetStringSlice("tools.read_file.deny_paths")...), 90 + ToolsWriteFileEnabled: r.GetBool("tools.write_file.enabled"), 91 + ToolsWriteFileMaxBytes: r.GetInt("tools.write_file.max_bytes"), 92 + ToolsBashEnabled: r.GetBool("tools.bash.enabled"), 93 + ToolsBashTimeout: r.GetDuration("tools.bash.timeout"), 94 + ToolsBashMaxOutputBytes: r.GetInt("tools.bash.max_output_bytes"), 95 + ToolsBashDenyPaths: append([]string(nil), r.GetStringSlice("tools.bash.deny_paths")...), 96 + ToolsBashInjectedEnvVars: append([]string(nil), r.GetStringSlice("tools.bash.injected_env_vars")...), 97 + ToolsPowerShellEnabled: r.GetBool("tools.powershell.enabled"), 98 + ToolsPowerShellTimeout: r.GetDuration("tools.powershell.timeout"), 99 + ToolsPowerShellMaxOutputBytes: r.GetInt("tools.powershell.max_output_bytes"), 100 + ToolsPowerShellDenyPaths: append([]string(nil), r.GetStringSlice("tools.powershell.deny_paths")...), 101 101 ToolsPowerShellInjectedEnvVars: append([]string(nil), r.GetStringSlice("tools.powershell.injected_env_vars")...), 102 - ToolsURLFetchEnabled: r.GetBool("tools.url_fetch.enabled"), 103 - ToolsURLFetchTimeout: r.GetDuration("tools.url_fetch.timeout"), 104 - ToolsURLFetchMaxBytes: r.GetInt64("tools.url_fetch.max_bytes"), 105 - ToolsURLFetchMaxBytesDownload: r.GetInt64("tools.url_fetch.max_bytes_download"), 106 - ToolsWebSearchEnabled: r.GetBool("tools.web_search.enabled"), 107 - ToolsWebSearchTimeout: r.GetDuration("tools.web_search.timeout"), 108 - ToolsWebSearchMaxResults: r.GetInt("tools.web_search.max_results"), 109 - ToolsWebSearchBaseURL: strings.TrimSpace(r.GetString("tools.web_search.base_url")), 110 - ToolsContactsSendEnabled: r.GetBool("tools.contacts_send.enabled"), 111 - ContactsDir: pathutil.ResolveStateChildDir(fileStateDir, strings.TrimSpace(r.GetString("contacts.dir_name")), "contacts"), 112 - TelegramBotToken: strings.TrimSpace(r.GetString("telegram.bot_token")), 113 - TelegramBaseURL: "https://api.telegram.org", 114 - SlackBotToken: strings.TrimSpace(r.GetString("slack.bot_token")), 115 - SlackBaseURL: strings.TrimSpace(r.GetString("slack.base_url")), 116 - LineChannelAccessToken: strings.TrimSpace(r.GetString("line.channel_access_token")), 117 - LineBaseURL: strings.TrimSpace(r.GetString("line.base_url")), 118 - LarkAppID: strings.TrimSpace(r.GetString("lark.app_id")), 119 - LarkAppSecret: strings.TrimSpace(r.GetString("lark.app_secret")), 120 - LarkBaseURL: strings.TrimSpace(r.GetString("lark.base_url")), 121 - ContactsFailureCooldown: consoleContactsFailureCooldownFromReader(r), 102 + ToolsURLFetchEnabled: r.GetBool("tools.url_fetch.enabled"), 103 + ToolsURLFetchTimeout: r.GetDuration("tools.url_fetch.timeout"), 104 + ToolsURLFetchMaxBytes: r.GetInt64("tools.url_fetch.max_bytes"), 105 + ToolsURLFetchMaxBytesDownload: r.GetInt64("tools.url_fetch.max_bytes_download"), 106 + ToolsWebSearchEnabled: r.GetBool("tools.web_search.enabled"), 107 + ToolsWebSearchTimeout: r.GetDuration("tools.web_search.timeout"), 108 + ToolsWebSearchMaxResults: r.GetInt("tools.web_search.max_results"), 109 + ToolsWebSearchBaseURL: strings.TrimSpace(r.GetString("tools.web_search.base_url")), 110 + ToolsContactsSendEnabled: r.GetBool("tools.contacts_send.enabled"), 111 + ContactsDir: pathutil.ResolveStateChildDir(fileStateDir, strings.TrimSpace(r.GetString("contacts.dir_name")), "contacts"), 112 + TelegramBotToken: strings.TrimSpace(r.GetString("telegram.bot_token")), 113 + TelegramBaseURL: "https://api.telegram.org", 114 + SlackBotToken: strings.TrimSpace(r.GetString("slack.bot_token")), 115 + SlackBaseURL: strings.TrimSpace(r.GetString("slack.base_url")), 116 + LineChannelAccessToken: strings.TrimSpace(r.GetString("line.channel_access_token")), 117 + LineBaseURL: strings.TrimSpace(r.GetString("line.base_url")), 118 + LarkAppID: strings.TrimSpace(r.GetString("lark.app_id")), 119 + LarkAppSecret: strings.TrimSpace(r.GetString("lark.app_secret")), 120 + LarkBaseURL: strings.TrimSpace(r.GetString("lark.base_url")), 121 + ContactsFailureCooldown: consoleContactsFailureCooldownFromReader(r), 122 122 } 123 123 } 124 124
+4 -4
go.mod
··· 3 3 go 1.25.0 4 4 5 5 require ( 6 + github.com/aws/aws-sdk-go-v2/config v1.32.16 7 + github.com/aws/aws-sdk-go-v2/credentials v1.19.15 6 8 github.com/chzyer/readline v1.5.1 7 9 github.com/google/uuid v1.6.0 8 10 github.com/gorilla/websocket v1.5.3 9 11 github.com/lyricat/goutils v1.2.3 10 12 github.com/modelcontextprotocol/go-sdk v1.4.0 11 13 github.com/nickalie/go-webpbin v0.0.0-20220110095747-f10016bf2dc1 12 - github.com/quailyquaily/uniai v0.1.21-0.20260429012404-a0f84e98d4ec 14 + github.com/openai/openai-go/v3 v3.2.0 15 + github.com/quailyquaily/uniai v0.1.21 13 16 github.com/spf13/cast v1.10.0 14 17 github.com/spf13/cobra v1.8.1 15 18 github.com/spf13/viper v1.19.0 ··· 32 35 github.com/adrg/xdg v0.5.3 // indirect 33 36 github.com/aws/aws-sdk-go v1.55.8 // indirect 34 37 github.com/aws/aws-sdk-go-v2 v1.41.6 // indirect 35 - github.com/aws/aws-sdk-go-v2/config v1.32.16 // indirect 36 - github.com/aws/aws-sdk-go-v2/credentials v1.19.15 // indirect 37 38 github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.22 // indirect 38 39 github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.22 // indirect 39 40 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.22 // indirect ··· 78 79 github.com/mitchellh/mapstructure v1.5.0 // indirect 79 80 github.com/nickalie/go-binwrapper v0.0.0-20190114141239-525121d43c84 // indirect 80 81 github.com/nwaples/rardecode v1.1.0 // indirect 81 - github.com/openai/openai-go/v3 v3.2.0 // indirect 82 82 github.com/pelletier/go-toml/v2 v2.2.2 // indirect 83 83 github.com/pierrec/lz4 v2.6.1+incompatible // indirect 84 84 github.com/pjbgf/sha1cd v0.5.0 // indirect
+2 -4
go.sum
··· 185 185 github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 186 186 github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= 187 187 github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 188 - github.com/quailyquaily/uniai v0.1.19 h1:UZvM8kFJgZKgn0YNLocRZpo5fHsszjZfv+9defugNoY= 189 - github.com/quailyquaily/uniai v0.1.19/go.mod h1:C3kQuLcZ+QvU1+uRmRXkHx3Jo8gaZxa6Da54aUI9nj4= 190 - github.com/quailyquaily/uniai v0.1.21-0.20260429012404-a0f84e98d4ec h1:HUPauulekNmeyuTJHai9qx90MT/98PxWhhX1ML87vxo= 191 - github.com/quailyquaily/uniai v0.1.21-0.20260429012404-a0f84e98d4ec/go.mod h1:C3kQuLcZ+QvU1+uRmRXkHx3Jo8gaZxa6Da54aUI9nj4= 188 + github.com/quailyquaily/uniai v0.1.21 h1:Z5LarPPOVXp5JjVVkA9foe3rTfjnZRW/2mGzswG308Q= 189 + github.com/quailyquaily/uniai v0.1.21/go.mod h1:C3kQuLcZ+QvU1+uRmRXkHx3Jo8gaZxa6Da54aUI9nj4= 192 190 github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= 193 191 github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= 194 192 github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
+6 -6
internal/acpclient/claude_integration_test.go
··· 52 52 } 53 53 54 54 prepared, err := PrepareAgentConfig(AgentConfig{ 55 - Name: "claude", 56 - Command: command, 57 - Args: strings.Fields(strings.TrimSpace(os.Getenv(claudeACPArgsEnv))), 58 - CWD: dir, 59 - ReadRoots: []string{dir}, 60 - WriteRoots: []string{dir}, 55 + Name: "claude", 56 + Command: command, 57 + Args: strings.Fields(strings.TrimSpace(os.Getenv(claudeACPArgsEnv))), 58 + CWD: dir, 59 + ReadRoots: []string{dir}, 60 + WriteRoots: []string{dir}, 61 61 SessionOptions: sessionOptions, 62 62 }, "") 63 63 if err != nil {
-1
internal/bus/envelope.go
··· 116 116 } 117 117 return nil 118 118 } 119 -
+25 -25
internal/llmutil/llmutil.go
··· 44 44 BedrockAWSProfile string `config:"llm.bedrock.aws_profile"` 45 45 BedrockAWSRegion string `config:"llm.bedrock.region"` 46 46 BedrockModelARN string `config:"llm.bedrock.model_arn"` 47 - CloudflareAccountID string `config:"llm.cloudflare.account_id"` 48 - CloudflareAPIToken string `config:"llm.cloudflare.api_token"` 47 + CloudflareAccountID string `config:"llm.cloudflare.account_id"` 48 + CloudflareAPIToken string `config:"llm.cloudflare.api_token"` 49 49 } 50 50 51 51 func RuntimeValuesFromReader(r ConfigReader) RuntimeValues { ··· 53 53 return RuntimeValues{} 54 54 } 55 55 return RuntimeValues{ 56 - Provider: strings.TrimSpace(r.GetString("llm.provider")), 57 - Endpoint: strings.TrimSpace(r.GetString("llm.endpoint")), 58 - APIKey: strings.TrimSpace(r.GetString("llm.api_key")), 59 - Model: strings.TrimSpace(r.GetString("llm.model")), 60 - Headers: loadStringMapKeyFromReader(r, "llm.headers"), 61 - CacheTTL: strings.TrimSpace(r.GetString("llm.cache_ttl")), 62 - CacheKeyPrefix: strings.TrimSpace(r.GetString("llm.cache_key_prefix")), 63 - AzureDeployment: strings.TrimSpace(r.GetString("llm.azure.deployment")), 64 - RequestTimeoutRaw: strings.TrimSpace(r.GetString("llm.request_timeout")), 65 - ToolsEmulationMode: strings.TrimSpace(r.GetString("llm.tools_emulation_mode")), 66 - TemperatureRaw: strings.TrimSpace(r.GetString("llm.temperature")), 67 - ReasoningEffortRaw: strings.TrimSpace(r.GetString("llm.reasoning_effort")), 68 - ReasoningBudgetRaw: strings.TrimSpace(r.GetString("llm.reasoning_budget_tokens")), 69 - PricingFile: strings.TrimSpace(r.GetString("llm.pricing_file")), 70 - ConfigPath: strings.TrimSpace(r.GetString("config")), 71 - Profiles: loadLLMProfilesFromReader(r), 72 - Routes: loadLLMRoutesFromReader(r), 56 + Provider: strings.TrimSpace(r.GetString("llm.provider")), 57 + Endpoint: strings.TrimSpace(r.GetString("llm.endpoint")), 58 + APIKey: strings.TrimSpace(r.GetString("llm.api_key")), 59 + Model: strings.TrimSpace(r.GetString("llm.model")), 60 + Headers: loadStringMapKeyFromReader(r, "llm.headers"), 61 + CacheTTL: strings.TrimSpace(r.GetString("llm.cache_ttl")), 62 + CacheKeyPrefix: strings.TrimSpace(r.GetString("llm.cache_key_prefix")), 63 + AzureDeployment: strings.TrimSpace(r.GetString("llm.azure.deployment")), 64 + RequestTimeoutRaw: strings.TrimSpace(r.GetString("llm.request_timeout")), 65 + ToolsEmulationMode: strings.TrimSpace(r.GetString("llm.tools_emulation_mode")), 66 + TemperatureRaw: strings.TrimSpace(r.GetString("llm.temperature")), 67 + ReasoningEffortRaw: strings.TrimSpace(r.GetString("llm.reasoning_effort")), 68 + ReasoningBudgetRaw: strings.TrimSpace(r.GetString("llm.reasoning_budget_tokens")), 69 + PricingFile: strings.TrimSpace(r.GetString("llm.pricing_file")), 70 + ConfigPath: strings.TrimSpace(r.GetString("config")), 71 + Profiles: loadLLMProfilesFromReader(r), 72 + Routes: loadLLMRoutesFromReader(r), 73 73 BedrockAWSKey: firstNonEmpty(r.GetString("llm.bedrock.aws_key"), r.GetString("llm.aws.key")), 74 74 BedrockAWSSecret: firstNonEmpty(r.GetString("llm.bedrock.aws_secret"), r.GetString("llm.aws.secret")), 75 75 BedrockAWSSessionToken: strings.TrimSpace(r.GetString("llm.bedrock.aws_session_token")), ··· 186 186 AzureAPIKey: strings.TrimSpace(cfg.APIKey), 187 187 AzureEndpoint: strings.TrimSpace(cfg.Endpoint), 188 188 AzureDeployment: strings.TrimSpace(cfg.Model), 189 - AwsKey: firstNonEmpty(values.BedrockAWSKey), 190 - AwsSecret: firstNonEmpty(values.BedrockAWSSecret), 191 - AwsSessionToken: firstNonEmpty(values.BedrockAWSSessionToken), 192 - AwsProfile: firstNonEmpty(values.BedrockAWSProfile), 193 - AwsRegion: firstNonEmpty(values.BedrockAWSRegion), 194 - AwsBedrockModelArn: firstNonEmpty(values.BedrockModelARN), 189 + AwsKey: firstNonEmpty(values.BedrockAWSKey), 190 + AwsSecret: firstNonEmpty(values.BedrockAWSSecret), 191 + AwsSessionToken: firstNonEmpty(values.BedrockAWSSessionToken), 192 + AwsProfile: firstNonEmpty(values.BedrockAWSProfile), 193 + AwsRegion: firstNonEmpty(values.BedrockAWSRegion), 194 + AwsBedrockModelArn: firstNonEmpty(values.BedrockModelARN), 195 195 CloudflareAccountID: firstNonEmpty( 196 196 values.CloudflareAccountID, 197 197 ),
-1
internal/mcphost/config.go
··· 107 107 } 108 108 return configs 109 109 } 110 -
+2 -2
providers/uniai/bedrock_credentials_test.go
··· 18 18 19 19 func TestResolveBedrockCredentialsPartialStaticKeyOnly(t *testing.T) { 20 20 cfg := Config{ 21 - Provider: "bedrock", 22 - AwsKey: "AKIA...", 21 + Provider: "bedrock", 22 + AwsKey: "AKIA...", 23 23 AwsRegion: "us-east-1", 24 24 } 25 25 err := ResolveBedrockCredentials(context.Background(), &cfg)
-1
providers/uniai/client.go
··· 17 17 uniaichat "github.com/quailyquaily/uniai/chat" 18 18 ) 19 19 20 - 21 20 type Config struct { 22 21 Provider string 23 22 Endpoint string