Centralize remaining runtime constants and add precedence/default fallback coverage

This commit is contained in:
2026-05-05 11:01:44 -05:00
parent d82bcd0581
commit ddb4254124
5 changed files with 70 additions and 6 deletions

View File

@@ -90,7 +90,7 @@ func (c *OpenAICompatibleClient) Generate(ctx context.Context, req domain.Genera
if endpoint == "" {
return nil, fmt.Errorf("%w: endpoint is required", ErrInvalidRequest)
}
endpoint = strings.TrimRight(endpoint, "/") + "/chat/completions"
endpoint = strings.TrimRight(endpoint, "/") + defaults.OpenAIChatCompletionsPath
wireReq := openAIChatRequest{
Model: model,