Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Copilot mode, AppMap services are launched with a token limit of more than 19,000 tokens #1029

Closed
kgilpin opened this issue Oct 3, 2024 · 1 comment · Fixed by #1030
Closed
Assignees
Labels
bug Something isn't working navie released

Comments

@kgilpin
Copy link
Contributor

kgilpin commented Oct 3, 2024

I am using Code 1.93.1 in Copilot mode.

The AppMap RPC process is being launched with a token limit of 19827.

16042 [Stdout] spawned node /Users/kgilpin/source/appland/appmap-js/packages/cli/built/cli.js index --watch --appmap-dir tmp/appmap with options {"retryTimes":3,"retryThreshold":180000,"id":"index","modulePath":"/Users/kgilpin/source/appland/appmap-js/packages/cli/built/cli.js","binPath":"/Users/kgilpin/.appmap/bin/appmap","log":{"name":"AppMap: Services"},"args":["index","--watch","--appmap-dir","tmp/appmap"],"cwd":"/Users/kgilpin/source/appland/appmap-js/packages/cli/tmp/applandinc.github.io","env":{"APPMAP_API_URL":"https://api.getappmap.com/","APPMAP_API_KEY":"***","OPENAI_API_KEY":"***","OPENAI_BASE_URL":"http://localhost:50048/vscode/copilot","APPMAP_NAVIE_TOKEN_LIMIT":"19827","APPMAP_NAVIE_MODEL":"gpt-4o"}}

Later in my session, I do get a token overflow error:

15756 [Stderr] Handling exception: UnprocessableEntityError: 422 Message exceeds token limit.
15756 [Stderr]     at APIError.generate (/Users/kgilpin/source/appland/appmap-js/node_modules/openai/error.js:60:20)
15756 [Stderr]     at OpenAI.makeStatusError (/Users/kgilpin/source/appland/appmap-js/node_modules/openai/core.js:275:33)
15756 [Stderr]     at OpenAI.makeRequest (/Users/kgilpin/source/appland/appmap-js/node_modules/openai/core.js:318:30)
15756 [Stderr]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
15756 [Stderr]     at async /Users/kgilpin/source/appland/appmap-js/node_modules/@langchain/openai/dist/chat_models.cjs:1306:29
15756 [Stderr]     at async RetryOperation._fn (/Users/kgilpin/source/appland/appmap-js/node_modules/p-retry/index.js:50:12) {
15756 [Stderr]   status: 422,
15756 [Stderr]   headers: {
15756 [Stderr]     connection: 'keep-alive',
15756 [Stderr]     date: 'Thu, 03 Oct 2024 13:04:51 GMT',
15756 [Stderr]     'keep-alive': 'timeout=5',
15756 [Stderr]     'transfer-encoding': 'chunked'
15756 [Stderr]   },
15756 [Stderr]   request_id: undefined,
15756 [Stderr]   error: undefined,
15756 [Stderr]   code: undefined,
15756 [Stderr]   param: undefined,
15756 [Stderr]   type: undefined,
15756 [Stderr]   attemptNumber: 1,
15756 [Stderr]   retriesLeft: 6
15756 [Stderr] }
15756 [Stderr] Stack trace: Error: 422 Message exceeds token limit.
15756 [Stderr]     at APIError.generate (/Users/kgilpin/source/appland/appmap-js/node_modules/openai/error.js:60:20)
15756 [Stderr]     at OpenAI.makeStatusError (/Users/kgilpin/source/appland/appmap-js/node_modules/openai/core.js:275:33)
15756 [Stderr]     at OpenAI.makeRequest (/Users/kgilpin/source/appland/appmap-js/node_modules/openai/core.js:318:30)
15756 [Stderr]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
15756 [Stderr]     at async /Users/kgilpin/source/appland/appmap-js/node_modules/@langchain/openai/dist/chat_models.cjs:1306:29
15756 [Stderr]     at async RetryOperation._fn (/Users/kgilpin/source/appland/appmap-js/node_modules/p-retry/index.js:50:12)
Version: 1.93.1 (Universal)
Commit: 38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40
Date: 2024-09-11T17:20:05.685Z
Electron: 30.4.0
ElectronBuildId: 10073054
Chromium: 124.0.6367.243
Node.js: 20.15.1
V8: 12.4.254.20-electron.0
OS: Darwin arm64 21.6.0
@kgilpin kgilpin added the bug Something isn't working label Oct 3, 2024
@kgilpin kgilpin added the navie label Oct 3, 2024
@kgilpin kgilpin assigned kgilpin and unassigned dividedmind Oct 3, 2024
@appland-release
Copy link
Contributor

🎉 This issue has been resolved in version 0.130.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working navie released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants