- Introduced idle connection timeout for HTTP client transport
- Implemented custom timeout for HTTP client when `RelayTimeout` is 0
- Set ImpatientHTTPClient timeout to 5 seconds
- Added new config variable `IdleTimeout` with default value of 30 seconds
- Utilized shared transport object for all HTTP clients in relay/util package
- Implemented error messages with request details and request parameter validation for image requests
- Added URL logic and Azure channel support for image generation requests
- Integrated quota management and updated quota usage logging for image generation requests
- Mapped original model names to mapped model names and unmarshalled image responses into a struct for further processing
- Modify `PostConsumeQuota` function in `common.go` to check if `totalQuota` is less than 0 and add error logging
- Update log content in `RecordConsumeLog` function of `common.go` to include model ratio and group ratio
- Change the method of calculating user used quota and request count in `UpdateUserUsedQuotaAndRequestCount` function of `common.go`
- Implement calculation of `completionRatio` and update `quota` calculation based on `completionRatio` in `postConsumeQuota` function of `helper.go`
- Implement error handling for `model.PostConsumeTokenQuota` and `model.CacheUpdateUserQuota` in `helper.go`
- Update `UserUsedQuota` and `ChannelUsedQuota` with new `quota` value in `helper.go`
- Refactor error handling in `relay.go` using the `errors` package
- Implement specific error handling for `specific_channel_id` in `shouldRetry` function
- Add checks for various status codes (`StatusTooManyRequests`, `Status5xx`, `Status2xx`) in `Relay` function
- Improve code quality by adding missing imports (`io`, `net/http`) in `relay.go`
- Update the minimum access token length from 16 to 32
- Prevent spam by introducing policies and detecting user agents
- Add an authorization header to the login response
- Use base64 to decode the session secret and generate a random one if not set
- Move `scanner.Split` instantiation to a new function
- Introduce a new regular expression to extract data from the response
- Utilize regular expressions to pre-process the event stream
- Refactor content response
- Update channel adaptor to support `claude_model`
- Remove `null` stop reasons from content responses
- Add logging for error responses
- Change content start, ping, and message delta types to return true
- Set stop reason to end turn when response does not include a stop reason
- Set content response stop reason to null
- Add error handling for unmarshalling stream responses
- Rename `Completion` to `Text` in type definitions and `StopReason` to `Delta.StopReason`
- Count tokens in the `Delta.Text` field of the response instead of `Completion`
- Remove `Model` from the full text response
- Trim \r from incoming data
- Refactor Anthropic adapter to work with the new Anthropic API and model requests
- Remove the default value for `MaxTokensToSample`
- Set `MaxTokens` to 500 instead of 1000000
- Use `system` messages as the system prompt instead of the first message
- Rewrite model name for relay text
- Simplify logic and move logging statements
- Remove a check that filtered out models by model-mapping
- Remove abilities for the model mapping
- Lower numeric tolerance for test files
- Add GoWebProd libraries for UUID version 7, various utilities, xxHash calculation, sets, and more.
- Update various libraries for improved file system monitoring, deques, JSON handling, logging, stubbing, and comparison.
- Log supported models when initializing channel cache and remove duplicates.