Cody Enterprise features
Along with the core features, Cody Enterprise offers additional features to enhance your coding experience.
IDE token expiry
Site administrators can set the duration of access tokens for users connecting Cody from their IDEs (VS Code, JetBrains, etc.). This can be configured from the Site admin page of the Sourcegraph Enterprise instance. Available options include 7, 14, 30, 60, and 90 days.
Guardrails
Open source attribution guardrails for public code, commonly called copyright guardrails, reduce the exposure to copyrighted code. This involves implementing a verification mechanism within Cody to ensure that any code generated by the platform does not replicate open source code.
Guardrails for public code are available to all Sourcegraph Enterprise instances and are disabled by default. You can enable them from the Site configuration section by setting attribution.enabled
to true
.
Guardrails don't differentiate between license types. It matches any code snippet that is at least ten lines long from the 290,000 indexed open source repositories.
Admin controls
Site administrators have selective control over users' access to Cody Enterprise, which is managed via the Sourcegraph role-based access control system. This provides a more intuitive user interface for assigning permission to use Cody.
Analytics
Cody Enterprise users can view analytics for their instance. A separately managed cloud service for Cody analytics handles user auth, gets metrics data from Sourcegraph's BigQuery instance, and visualizes the metrics data.
The following metrics are available for Cody Enterprise users:
Metric Type | What is measured? |
---|---|
Active users | - Total active users - Average daily users - Average no. of days each user used Cody (of last 30 days) - Cody users by day (last 30 days) - Cody users by month (last two months) - Cody users by number of days used |
Completions | - Total accepted completions - Minutes saved per completion - Hours saved by completions - Cody completions by day - Completions acceptance rate - Weighted completions acceptance rate - Average completion latency - Acceptance rate by language |
Chat | - Total chat events - Minutes saved per chat - Hours saved by chats - Cody chats by day |
Commands | - Total command events - Minutes saved per command - Hours saved by commands - Cody commands by day - Most used commands |
To enable Cody Analytics:
- Create an account on Sourcegraph Accounts
- A user already having a Sourcegraph.com account gets automatically migrated to Sourcegraph Accounts. Users can sign in to Cody Analytics using their email and password
- Users without a Sourcegraph.com account should contact one of our team members. They can help with both the account setup and assigning instances to specific users
- Map your user account to a Sourcegraph instance, and this gives you access to Cody analytics
Multi-repository context
Cody supports multi-repository context, allowing you to search up to 10 repositories simultaneously for relevant information. Open a new chat, type @
, and select Remote Repositories.
Keep @-mentioning repos that you want to include in your context. This flexibility lets you get more comprehensive and accurate responses by leveraging information across multiple codebases.
@-mention directories
To better support teams working with large monorepos, Enterprise users can @-mention
directories when chatting with Cody. This helps you define more specific directories and sub-directories within that monorepo to give more precise context.
To do this, type @
in the chat, and then select Directories to search other repositories for context in your codebase.
Please note that you can only @-mention
remote directories (i.e., directories in your Sourcegraph instance) but not local directories. This means any recent changes to your directories can't be utilized as context until your Sourcegraph instance re-indexes any changes.
If you want to include recent changes that haven't been indexed in your Sourcegraph instance, you can @-mention
specific files, lines of code, or symbols.
Prompt pre-instructions
v5.10
and more.Site admins can add and configure prompt pre-instructions for Cody. These are text instructions that Cody uses with every chat query, allowing organizations to configure how Cody responds to their users.
For example, if you don’t want Cody to answer questions relating to sensitive non-code matters, you can pre-instruct Cody about it. In this case, if a user asks an unrelated question, Cody responds with a pre-instructed context.
To configure pre-instructions, add the following to your site admin configuration file:
JSON{ ... "modelConfiguration": { "systemPreInstruction": "If the question is not directly related to software development, respond with \"I can only answer programming-related questions\"" } }
Supported LLM models
Sourcegraph Enterprise supports different LLM providers and models, such as models from Anthropic and OpenAI. You can do this by adjusting your Sourcegraph instance configuration.
For the supported LLM models listed above, refer to the following notes:
- Microsoft Azure is planning to deprecate the APIs used in Sourcegraph version
>5.3.3
on July 1, 2024 Source - Claude 2.1 is not recommended
- Sourcegraph doesn’t recommend using the GPT-4 (non-Turbo), Claude 1, or Claude 2 models anymore
- Only supported through legacy completions API
- BYOK (Bring Your Own Key) with managed services are only supported for Self-hosted Sourcegraph instances
- GPT-4 and GPT-4o for completions have a bug that is resulting in many failed completions