Skip to content

Problem with configuring user agent string via environment variables #2659

@anojht

Description

@anojht

Hello Replicate team,

Thank you for adding support for configuring user agent strings for requests in #2620 and #2656!

However, there is an issue with the implementation. Due to the regex pattern, user agent string with whitespace characters like the following are not allowed to be set in the cog.yaml config:

environment:
  - COG_USER_AGENT=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

It would be great if the schema regex was updated to allow quoted strings or escape sequences.

"pattern": "^[A-Za-z_][A-Za-z0-9_]*=[^\\s]+$"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions